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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user