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());