1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 13:03:11 +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

@@ -1688,8 +1688,8 @@ void InputScrollViewport(const ScreenCoordsXY& scrollScreenCoords)
int32_t y = mainWindow->savedViewPos.y + viewport->view_height / 2;
int32_t y_dy = mainWindow->savedViewPos.y + viewport->view_height / 2 + dy;
auto mapCoord = ViewportPosToMapPos({ x, y }, 0);
auto mapCoord_dy = ViewportPosToMapPos({ x, y_dy }, 0);
auto mapCoord = ViewportPosToMapPos({ x, y }, 0, viewport->rotation);
auto mapCoord_dy = ViewportPosToMapPos({ x, y_dy }, 0, viewport->rotation);
// Check if we're crossing the boundary
// Clamp to the map minimum value