1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Fix #24617: Prevent hired boat with 0 speed causing division by 0

This commit is contained in:
Michał Janiszewski
2025-06-15 23:05:55 +02:00
committed by Gymnasiast
parent cf72933aa5
commit aa519879a7
2 changed files with 5 additions and 1 deletions

View File

@@ -3920,7 +3920,10 @@ void Vehicle::UpdateMotionBoatHire()
}
eax -= velocity;
edx = powered_acceleration * 2;
ecx += (eax * edx) / ebx;
if (ebx != 0)
{
ecx += (eax * edx) / ebx;
}
}
acceleration = ecx;
}