diff --git a/Runtime/MP1/World/CActorContraption.cpp b/Runtime/MP1/World/CActorContraption.cpp index 374d824e3..656b8c6f7 100644 --- a/Runtime/MP1/World/CActorContraption.cpp +++ b/Runtime/MP1/World/CActorContraption.cpp @@ -53,11 +53,12 @@ void MP1::CActorContraption::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId void MP1::CActorContraption::Think(float dt, CStateManager& mgr) { CScriptActor::Think(dt, mgr); - for (const std::pair& uid : x2e8_children) { - CFlameThrower* act = static_cast(mgr.ObjectById(uid.first)); + for (const auto& [uid, name] : x2e8_children) { + auto* act = static_cast(mgr.ObjectById(uid)); - if (act && act->GetActive()) - act->SetTransform(x34_transform * GetScaledLocatorTransform(uid.second), dt); + if (act && act->GetActive()) { + act->SetTransform(x34_transform * GetScaledLocatorTransform(name), dt); + } } }