1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix #6846: Ride overview window zoom level set too high

This commit is contained in:
rwjuk
2017-12-27 16:47:06 +00:00
committed by Michael Steenbeek
parent 6b2a0063ee
commit 29c604d850
2 changed files with 3 additions and 1 deletions

View File

@@ -81,6 +81,7 @@
- Fix: [#6657] Guest list is missing tracking icon after reopening.
- Fix: [#6803] Symbolic links to directories are not descended by FileScanner.
- Fix: [#6830] Crash when using mountain tool due to ride with no ride entry.
- Fix: [#6846] Zoom level in some ride overview windows was erroneously set too high.
- Fix: Infinite loop when removing scenery elements with >127 base height.
- Fix: Ghosting of transparent map elements when the viewport is moved in OpenGL mode.
- Fix: Clear IME buffer after committing composed text.

View File

@@ -1486,7 +1486,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
double zoom = ceil(log(size / 80)) - 1;
// Value clamped to a minimum of 0 to prevent underflow
sint32 zoom = Math::Max((sint32)ceil(log(size / 80)) - 1, 0);
view->zoom = Math::Clamp<uint8>(0, zoom, 3);
}