From e3062985c00357cce6a66fe789e7913877096513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:49:16 +0300 Subject: [PATCH] Fix code calling ViewportUpdatePosition this is incorrect --- src/openrct2-ui/WindowManager.cpp | 3 --- src/openrct2/interface/InteractiveConsole.cpp | 1 - src/openrct2/scenes/title/Command/SetLocation.cpp | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index 86d352426f..9a54bebf3a 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -639,9 +639,6 @@ public: mainWindow->savedViewPos.x -= viewport->ViewWidth() / 2; mainWindow->savedViewPos.y -= viewport->ViewHeight() / 2; - // Make sure the viewport has correct coordinates set. - ViewportUpdatePosition(mainWindow); - mainWindow->Invalidate(); } } diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index fe449143bc..a4ef0e0682 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -917,7 +917,6 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar auto location = TileCoordsXYZ(int_val[0], int_val[1], 0).ToCoordsXYZ().ToTileCentre(); location.z = TileElementHeight(location); w->SetLocation(location); - ViewportUpdatePosition(w); console.Execute("get location"); } } diff --git a/src/openrct2/scenes/title/Command/SetLocation.cpp b/src/openrct2/scenes/title/Command/SetLocation.cpp index 0a5945a59f..26a6663232 100644 --- a/src/openrct2/scenes/title/Command/SetLocation.cpp +++ b/src/openrct2/scenes/title/Command/SetLocation.cpp @@ -31,7 +31,7 @@ namespace OpenRCT2::Title w->SetLocation({ loc, z }); gLegacyScene = oldLegacyScene; - ViewportUpdatePosition(w); + //ViewportUpdatePosition(w); } return 0;