Replace hardcoded max zoomlevel

This commit is contained in:
Hielke Morsink committed 2021-11-30 19:11:08 +01:00
1 parent f3735dc076
commit b6562082e9
1 file changed
+1 -1
+1 -1
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
{