Fix #12939: divide-by-0 in Vehicle::UpdateMotionDodgems()

This commit is contained in:
Gymnasiast 2021-02-09 19:13:38 +01:00
parent 6e5b4726a3
commit 45464cddeb
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 2 additions and 1 deletions

View File

@ -6476,7 +6476,8 @@ int32_t Vehicle::UpdateMotionDodgems()
}
_eax -= velocity;
_eax *= powered_acceleration * 2;
_eax /= ebx;
if (ebx != 0)
_eax /= ebx;
acceleration = _eax - eax;
return _vehicleMotionTrackFlags;