diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3c3b99be94..b1d0926329 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -17,6 +17,7 @@ - Fix: [#24589] Music tab doesn’t fully render in multiplayer. - Fix: [#24615] Blank strings in Windows installer. - Fix: [#24617] ‘Divide by zero’ error when updating boat hire acceleration. +- Fix: [#24626] Viewports that only follow sprites (e.g. in the Ride and Guest windows) can be made to unfollow them. 0.4.23 (2025-06-07) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index 3ed57095d3..a35d492be0 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -551,7 +551,13 @@ namespace OpenRCT2 ContextHideCursor(); } - WindowUnfollowSprite(w); + // Only unfollow sprites for the main window or ‘extra viewport’ windows. + // Don’t unfollow for windows where the viewport is always supposed to follow (e.g. Ride, Guest, Staff). + auto mainWindow = WindowGetMain(); + if (&w == mainWindow || w.classification == WindowClass::Viewport) + { + WindowUnfollowSprite(w); + } // gInputFlags.set(InputFlag::unk5); }