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