mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 18:55:28 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -213,10 +213,10 @@ void MovingPlatformComponent::SetupRotator() {
|
|||||||
auto* const rotator = static_cast<RotatorSubComponent*>(GetMoverSubComponent());
|
auto* const rotator = static_cast<RotatorSubComponent*>(GetMoverSubComponent());
|
||||||
// LWOPlatformRotator::LoadConfigData 0x00c33e10
|
// LWOPlatformRotator::LoadConfigData 0x00c33e10
|
||||||
constexpr float pi = 3.14159265358979323846f;
|
constexpr float pi = 3.14159265358979323846f;
|
||||||
if (m_Parent->HasVar(u"rotX")) rotator->mRotationX = m_Parent->GetVar<float>(u"rotX") * pi;
|
if (m_Parent->HasVar(u"rotX")) rotator->mRotationX = m_Parent->GetVarAs<float>(u"rotX") * pi;
|
||||||
if (m_Parent->HasVar(u"rotY")) rotator->mRotationY = m_Parent->GetVar<float>(u"rotY") * pi;
|
if (m_Parent->HasVar(u"rotY")) rotator->mRotationY = m_Parent->GetVarAs<float>(u"rotY") * pi;
|
||||||
if (m_Parent->HasVar(u"rotZ")) rotator->mRotationZ = m_Parent->GetVar<float>(u"rotZ") * pi;
|
if (m_Parent->HasVar(u"rotZ")) rotator->mRotationZ = m_Parent->GetVarAs<float>(u"rotZ") * pi;
|
||||||
rotator->mRate = m_Parent->GetVar<float>(u"rate");
|
rotator->mRate = m_Parent->GetVarAs<float>(u"rate");
|
||||||
|
|
||||||
if (m_Path == nullptr || m_Path->pathWaypoints.empty()) return;
|
if (m_Path == nullptr || m_Path->pathWaypoints.empty()) return;
|
||||||
// LWOPlatform::SetupPath 0x00c17d10
|
// LWOPlatform::SetupPath 0x00c17d10
|
||||||
|
|||||||
Reference in New Issue
Block a user