From ec9927acbb1a304e331cab5b1af4b86f4f0ef9f1 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 26 Jun 2025 04:03:25 -0700 Subject: [PATCH] fix: multiplied speeds with Speed Behaviors (#1832) --- dGame/dComponents/ModelComponent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dGame/dComponents/ModelComponent.cpp b/dGame/dComponents/ModelComponent.cpp index 07eafd45..4998c605 100644 --- a/dGame/dComponents/ModelComponent.cpp +++ b/dGame/dComponents/ModelComponent.cpp @@ -265,7 +265,7 @@ bool ModelComponent::TrySetVelocity(const NiPoint3& velocity) const { // If we're currently moving on an axis, prevent the move so only 1 behavior can have control over an axis if (velocity != NiPoint3Constant::ZERO) { - const auto [x, y, z] = velocity; + const auto [x, y, z] = velocity * m_Speed; if (x != 0.0f) { if (currentVelocity.x != 0.0f) return false; currentVelocity.x = x; @@ -280,7 +280,6 @@ bool ModelComponent::TrySetVelocity(const NiPoint3& velocity) const { currentVelocity = velocity; } - currentVelocity *= m_Speed; m_Parent->SetVelocity(currentVelocity); return true; }