From 6464486800694ce6a579f2e1f4219983fc11dbde Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Sun, 24 Mar 2024 21:16:49 -0400 Subject: [PATCH] Match LegoNavController::CalculateNewPosDir & LegoNavController::CalculateNewTargetVel (#723) --- LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp index 705db2f4..4e651584 100644 --- a/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp +++ b/LEGO1/lego/legoomni/src/entity/legonavcontroller.cpp @@ -236,7 +236,7 @@ float LegoNavController::CalculateNewTargetVel(int p_pos, int p_center, float p_ float newVel; int diff = p_pos - p_center; - if (diff > m_deadZone) { + if (diff < m_deadZone) { newVel = (diff - m_deadZone) * p_max / (p_center - m_deadZone); } else if (diff < -m_deadZone) { @@ -375,7 +375,7 @@ MxBool LegoNavController::CalculateNewPosDir( } delta_pos[1] += m_unk0x60; - VPV3(p_newPos, new_pos, delta_pos); + VPV3(p_newPos, delta_pos, new_pos); if (m_unk0x68 != 0.0f) { float delta_rad = DTOR(m_unk0x68);