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

Fix ViewportPosToMapPos using the wrong rotation

This commit is contained in:
ζeh Matt
2024-02-18 15:04:46 +02:00
parent a33cc1ac86
commit d95f14dcda
7 changed files with 12 additions and 12 deletions

View File

@@ -958,7 +958,7 @@ void WindowViewportGetMapCoordsByCursor(
// Compute map coordinate by mouse position.
auto viewportPos = w.viewport->ScreenToViewportCoord(mouseCoords);
auto coordsXYZ = ViewportAdjustForMapHeight(viewportPos, w.viewport->rotation);
auto mapCoords = ViewportPosToMapPos(viewportPos, coordsXYZ.z);
auto mapCoords = ViewportPosToMapPos(viewportPos, coordsXYZ.z, w.viewport->rotation);
*map_x = mapCoords.x;
*map_y = mapCoords.y;