You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Fix overflow in ride_mode_tweak (#3478)
Fixes #2529: Time overflow when unlocking dodgems' operating limits Fixes #3424: Max. people on ride overflows when operating limit is unlocked
This commit is contained in:
@@ -2798,9 +2798,9 @@ static void window_ride_mode_tweak_increase(rct_window *w)
|
||||
}
|
||||
|
||||
uint8 increment = ride->mode == RIDE_MODE_BUMPERCAR ? 10 : 1;
|
||||
uint8 newValue = ride->operation_option + increment;
|
||||
if (newValue <= maxValue) {
|
||||
window_ride_mode_tweak_set(w, newValue);
|
||||
|
||||
if (maxValue - increment >= ride->operation_option) {
|
||||
window_ride_mode_tweak_set(w, ride->operation_option + increment);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user