forked from rosebudai/OpenRCT2-Web
Fix #12861: Divide-by-0 in UpdateTrackMotionMiniGolf
This fix had already been applied to UpdateTrackMotionPoweredRideAcceleration(), but not here.
This commit is contained in:
1 parent
0a8cfe75b0
commit
7744458cc8
1 file changed
+2
-1
@@ -9332,7 +9332,8 @@ int32_t Vehicle::UpdateTrackMotionMiniGolf(int32_t* outStation)
|
||||
}
|
||||
poweredAcceleration -= velocity;
|
||||
poweredAcceleration *= powered_acceleration << 1;
|
||||
poweredAcceleration = poweredAcceleration / quarterForce;
|
||||
if (quarterForce != 0)
|
||||
poweredAcceleration /= quarterForce;
|
||||
|
||||
if (vehicleEntry->flags & VEHICLE_ENTRY_FLAG_WATER_RIDE)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user