1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 15:24:30 +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

@@ -184,7 +184,7 @@ namespace OpenRCT2::Scripting
if (viewport != nullptr)
{
auto centre = viewport->viewPos + ScreenCoordsXY{ viewport->view_width / 2, viewport->view_height / 2 };
auto coords = ViewportPosToMapPos(centre, 24);
auto coords = ViewportPosToMapPos(centre, 24, viewport->rotation);
auto ctx = GetContext()->GetScriptEngine().GetContext();
auto obj = duk_push_object(ctx);