1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

clamp ride overview viewport zoom level to allowed range

This commit is contained in:
IntelOrca
2016-02-27 13:30:00 +00:00
parent d27c9c0ec4
commit 22a194ffa6

View File

@@ -1221,7 +1221,8 @@ static void window_ride_update_overall_view(uint8 ride_index) {
// Each farther zoom level shows twice as many tiles (log)
// Appropriate zoom is lowered by one to fill the entire view with the ride
view->zoom = (uint8) max(0, ceil(log(size / 80)) - 1);
double zoom = ceil(log(size / 80)) - 1;
view->zoom = (uint8)clamp(0, zoom, 3);
}
/**