From 42d02fc6199ca1faa5284c29a14c13d8abb5e218 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 10 Nov 2026 16:57:15 -0600 Subject: [PATCH] fix(moving platform): a rotator reads its angles and rate whatever type the level gave them LWOPlatformRotator::LoadConfigData (0x00c33e10) reads rotX, rotY, rotZ and rate as floats from the config; a value the level stored as another number type read as 0 here. Co-Authored-By: Claude Fable 5.2 --- dGame/dComponents/MovingPlatformComponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dGame/dComponents/MovingPlatformComponent.cpp b/dGame/dComponents/MovingPlatformComponent.cpp index 82d1b52a5..74f836288 100644 --- a/dGame/dComponents/MovingPlatformComponent.cpp +++ b/dGame/dComponents/MovingPlatformComponent.cpp @@ -213,10 +213,10 @@ void MovingPlatformComponent::SetupRotator() { auto* const rotator = static_cast(GetMoverSubComponent()); // LWOPlatformRotator::LoadConfigData 0x00c33e10 constexpr float pi = 3.14159265358979323846f; - if (m_Parent->HasVar(u"rotX")) rotator->mRotationX = m_Parent->GetVar(u"rotX") * pi; - if (m_Parent->HasVar(u"rotY")) rotator->mRotationY = m_Parent->GetVar(u"rotY") * pi; - if (m_Parent->HasVar(u"rotZ")) rotator->mRotationZ = m_Parent->GetVar(u"rotZ") * pi; - rotator->mRate = m_Parent->GetVar(u"rate"); + if (m_Parent->HasVar(u"rotX")) rotator->mRotationX = m_Parent->GetVarAs(u"rotX") * pi; + if (m_Parent->HasVar(u"rotY")) rotator->mRotationY = m_Parent->GetVarAs(u"rotY") * pi; + if (m_Parent->HasVar(u"rotZ")) rotator->mRotationZ = m_Parent->GetVarAs(u"rotZ") * pi; + rotator->mRate = m_Parent->GetVarAs(u"rate"); if (m_Path == nullptr || m_Path->pathWaypoints.empty()) return; // LWOPlatform::SetupPath 0x00c17d10