From 85db8bfba2a62d4c786df2fb15ec86092909433a 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 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 6e949c1bf..50622d5c5 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 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