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:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user