From 2d364ec07031c384f7ec06a6fd5941399dfaecc1 Mon Sep 17 00:00:00 2001 From: mix <167040362+mixiate@users.noreply.github.com> Date: Tue, 3 Jun 2025 11:04:10 +0100 Subject: [PATCH] Fix guest window viewport on pick up and thoughts not invalidating (#24535) --- src/openrct2-ui/windows/Guest.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index b5946b43e9..2670b7f517 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -933,6 +933,22 @@ namespace OpenRCT2::Ui::Windows } } } + + const std::optional currentFocus = peep->State != PeepState::Picked ? std::optional(Focus(peep->Id)) + : std::nullopt; + if (focus != currentFocus) + { + OnViewportRotate(); + } + + for (const auto& thought : peep->Thoughts) + { + if (thought.freshness == 1 || thought.freshness == 2) + { + InvalidateWidget(WIDX_MARQUEE); + break; + } + } } void OnTextInputOverview(WidgetIndex widgetIndex, std::string_view text)