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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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;