1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix ScViewport::moveTo not using the right rotation

This commit is contained in:
ζeh Matt
2024-02-18 14:52:24 +02:00
parent 7be082cacc
commit a33cc1ac86

View File

@@ -208,7 +208,7 @@ namespace OpenRCT2::Scripting
auto coords = GetCoordsFromObject(position); auto coords = GetCoordsFromObject(position);
if (coords) if (coords)
{ {
auto screenCoords = Translate3DTo2DWithZ(GetCurrentRotation(), *coords); auto screenCoords = Translate3DTo2DWithZ(viewport->rotation, *coords);
auto left = screenCoords.x - (viewport->view_width / 2); auto left = screenCoords.x - (viewport->view_width / 2);
auto top = screenCoords.y - (viewport->view_height / 2); auto top = screenCoords.y - (viewport->view_height / 2);
SetViewLeftTop(left, top); SetViewLeftTop(left, top);