1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

Amend #12470: Make zooming at pointer take tile height into account

This commit is contained in:
frutiemax
2020-07-25 19:28:29 -04:00
committed by GitHub
parent b7e469cf33
commit 96a75f8c2c

View File

@@ -954,7 +954,8 @@ void window_viewport_get_map_coords_by_cursor(
// Compute map coordinate by mouse position.
auto viewportPos = screen_coord_to_viewport_coord(w->viewport, mouseCoords);
auto mapCoords = viewport_coord_to_map_coord(viewportPos, 0);
auto coordsXYZ = viewport_adjust_for_map_height(viewportPos);
auto mapCoords = viewport_coord_to_map_coord(viewportPos, coordsXYZ.z);
*map_x = mapCoords.x;
*map_y = mapCoords.y;