1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Replace hardcoded max zoomlevel

This commit is contained in:
Hielke Morsink
2021-09-28 18:10:00 +02:00
parent f3735dc076
commit b6562082e9

View File

@@ -1212,7 +1212,7 @@ static void WindowRideUpdateOverallView(Ride* ride)
{
// 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 = std::clamp<int32_t>(std::ceil(std::log(size / 80)) - 1, 0, 3);
view.zoom = std::clamp<ZoomLevel>(std::ceil(std::log(size / 80)) - 1, 0, ZoomLevel::max());
}
else
{