1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Fix #11623: Erratic zoom behavior when pointing outside of the map

This commit is contained in:
ζeh Matt
2020-07-26 00:27:40 +02:00
committed by GitHub
parent 28d3b51c72
commit b7e469cf33
2 changed files with 3 additions and 2 deletions

View File

@@ -37,6 +37,7 @@
- Fix: [#11405] Building a path through walls does not always remove the walls. - Fix: [#11405] Building a path through walls does not always remove the walls.
- Fix: [#11450] Rides with unsuitable track can't be opened even with "Enable all drawable track pieces" cheat. - Fix: [#11450] Rides with unsuitable track can't be opened even with "Enable all drawable track pieces" cheat.
- Fix: [#11455] Object Selection window cuts off scenery names. - Fix: [#11455] Object Selection window cuts off scenery names.
- Fix: [#11623] Erratic zoom behavior when pointing outside of the map.
- Fix: [#11640] Objects with a blank description in one language do not fall back to other languages anymore. - Fix: [#11640] Objects with a blank description in one language do not fall back to other languages anymore.
- Fix: [#11676] Spiral Roller Coaster has regular lift hill available. - Fix: [#11676] Spiral Roller Coaster has regular lift hill available.
- Fix: [#11695] Mechanics walk to tile 0, 0 at entrance only stations when trying to fix them. - Fix: [#11695] Mechanics walk to tile 0, 0 at entrance only stations when trying to fix them.

View File

@@ -953,8 +953,8 @@ void window_viewport_get_map_coords_by_cursor(
auto mouseCoords = context_get_cursor_position_scaled(); auto mouseCoords = context_get_cursor_position_scaled();
// Compute map coordinate by mouse position. // Compute map coordinate by mouse position.
CoordsXY mapCoords; auto viewportPos = screen_coord_to_viewport_coord(w->viewport, mouseCoords);
get_map_coordinates_from_pos(mouseCoords, VIEWPORT_INTERACTION_MASK_NONE, mapCoords, nullptr, nullptr, nullptr); auto mapCoords = viewport_coord_to_map_coord(viewportPos, 0);
*map_x = mapCoords.x; *map_x = mapCoords.x;
*map_y = mapCoords.y; *map_y = mapCoords.y;