From 826dd9ee5992fd30745feaba137711c2cce94f55 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 09:18:04 -0500 Subject: [PATCH] fix(scripts): Gnarled Forest tiki torches lock while in use, cooldown from the animation The port turned the in-use flag off on a second use instead of refusing it, so a torch could be used again at once; it now stays in use until the interact animation is done, as L_GF_TORCH does, and the cooldown is that animation's length (4 seconds when it has none) instead of a flat 4. Check: use a tiki torch twice quickly: the second use does nothing until the torch is done. Co-Authored-By: Claude Opus 5.5 --- dScripts/02_server/Map/GF/GfTikiTorch.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dScripts/02_server/Map/GF/GfTikiTorch.cpp b/dScripts/02_server/Map/GF/GfTikiTorch.cpp index a33f451bf..75ca9044f 100644 --- a/dScripts/02_server/Map/GF/GfTikiTorch.cpp +++ b/dScripts/02_server/Map/GF/GfTikiTorch.cpp @@ -16,12 +16,11 @@ void GfTikiTorch::OnStartup(Entity* self) { } void GfTikiTorch::OnUse(Entity* self, Entity* killer) { - if (self->GetBoolean(u"isInUse")) { - self->SetBoolean(u"isInUse", false); - return; - } + // In use until the interact animation is done, as in L_GF_TORCH (bIsInUse) + if (self->GetBoolean(u"isInUse")) return; + self->SetBoolean(u"isInUse", true); - RenderComponent::PlayAnimation(self, u"interact"); + const auto cooldownTime = RenderComponent::PlayAnimation(self, u"interact"); self->SetI64(u"userID", killer->GetObjectID()); for (int i = 0; i < m_numspawn; i++) { @@ -35,7 +34,8 @@ void GfTikiTorch::OnUse(Entity* self, Entity* killer) { Loot::DropItem(*killer, lootMsg); } - self->AddTimer("InteractionCooldown", 4); + // The interact animation's length, as the live script times it (4 seconds when there is none) + self->AddTimer("InteractionCooldown", cooldownTime > 0.0f ? cooldownTime : 4.0f); } void GfTikiTorch::OnTimerDone(Entity* self, std::string timerName) {