From 1a481564896f8ee4d1e1d0b1807ec48b910c7a94 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 30 Sep 2026 09:59:55 -0500 Subject: [PATCH] fix(njhub): the cave prison counterweight goes down as its simple mover Co-Authored-By: Claude Opus 5.5 --- dScripts/02_server/Map/njhub/CavePrisonCage.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dScripts/02_server/Map/njhub/CavePrisonCage.cpp b/dScripts/02_server/Map/njhub/CavePrisonCage.cpp index 884271165..6ce4e0868 100644 --- a/dScripts/02_server/Map/njhub/CavePrisonCage.cpp +++ b/dScripts/02_server/Map/njhub/CavePrisonCage.cpp @@ -6,6 +6,7 @@ #include "Character.h" #include "dZoneManager.h" #include "RenderComponent.h" +#include "MovingPlatformComponent.h" void CavePrisonCage::OnStartup(Entity* self) { const auto& myNum = self->GetVar(u"myNumber"); @@ -83,20 +84,15 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) { }); quickBuildComponent->AddQuickBuildCompleteCallback([this, self](Entity* user) { - // The counterweight is a simple mover, which is not implemented, so we'll just set it's position auto* counterweight = Game::entityManager->GetEntity(self->GetVar(u"Counterweight")); if (counterweight == nullptr) { return; } - // Move the counterweight down 2 units - counterweight->SetPosition(counterweight->GetPosition() + NiPoint3(0, -2, 0)); - - // Serialize the counterweight - Game::entityManager->SerializeEntity(counterweight); - - // notifyPlatformAtLastWaypoint + // The counterweight is a simple mover (MovingPlatforms row 41): send it down to its end + auto* const platform = counterweight->GetComponent(); + if (platform) platform->GotoWaypoint(1); // Save the userID as Builder self->SetVar(u"Builder", user->GetObjectID());