mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
LegoNavController: Match CalculateNewTargetSpeed
Ghidra showed this correctly too, but the asm showed the problem simply, an incorrect comparison
This commit is contained in:
@@ -155,7 +155,7 @@ float LegoNavController::CalculateNewTargetSpeed(int p_pos, int p_center, float
|
||||
float result;
|
||||
int diff = p_pos - p_center;
|
||||
|
||||
if (diff > this->m_mouseDeadzone)
|
||||
if (diff < this->m_mouseDeadzone)
|
||||
result = (diff - m_mouseDeadzone) * p_maxSpeed / (p_center - m_mouseDeadzone);
|
||||
else if (diff < -m_mouseDeadzone)
|
||||
result = (diff + m_mouseDeadzone) * p_maxSpeed / (p_center - m_mouseDeadzone);
|
||||
|
Reference in New Issue
Block a user