Further accuracy improvement on LegoNavController::Notify (#1255)

* Further accuracy improvement on `LegoNavController::Notify`

* Use enum
This commit is contained in:
Christian Semmler 2024-12-21 15:38:22 -07:00 committed by GitHub
parent a987533ba1
commit b03de35e30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,16 +82,16 @@ MxBool LegoNavController::g_defuseRotationalVel = FALSE;
MxU32 g_changeLight = FALSE;
// GLOBAL: LEGO1 0x100f66a4
MxU32 g_locationCalcStep = 0;
MxS32 g_locationCalcStep = 0;
// GLOBAL: LEGO1 0x100f66a8
MxU32 g_nextLocation = 0;
MxS32 g_nextLocation = 0;
// GLOBAL: LEGO1 0x100f66ac
MxBool g_resetPlants = FALSE;
// GLOBAL: LEGO1 0x100f66b0
MxU32 g_animationCalcStep = 0;
MxS32 g_animationCalcStep = 0;
// GLOBAL: LEGO1 0x100f66b4
MxS32 g_nextAnimation = 0;
@ -607,8 +607,8 @@ MxResult LegoNavController::ProcessKeyboardInput()
bool2 = TRUE;
}
MxFloat val = keyFlags & 0x10 ? 1.0f : 4.0f;
MxFloat val2 = keyFlags & 0x10 ? 1.0f : 2.0f;
MxFloat val = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 4.0f;
MxFloat val2 = keyFlags & LegoInputManager::c_bit5 ? 1.0f : 2.0f;
if (!bool1) {
m_targetRotationalVel = CalculateNewTargetVel(hMax, m_hMax / 2, m_maxRotationalVel);