From 4afbbed9bd49b466201d50956233bc3054b6bf6b Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Thu, 10 Sep 2020 14:11:17 -0300 Subject: [PATCH] Fix #12881: Guests' favourite rides not listed in the guest window --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/Guest.cpp | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index d13aee3d8a..956aa0d9f9 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -16,6 +16,7 @@ - Fix: [#12820] Title menu buttons not invalidating properly - Fix: [#12845] Deleting ride with active ad campaign creates incorrect notification. - Fix: [#12857] Incorrect Peep thoughts in imported RCT1 parks. +- Fix: [#12881] Guests' favourite rides are not listed in the guest window. - Fix: Incomplete loop collision box allowed overlapping track (original bug). - Technical: The required version of macOS has been lowered to 10.13 (High Sierra). diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index f4fbfa1885..ca06b821f6 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1765,15 +1765,16 @@ void window_guest_rides_paint(rct_window* w, rct_drawpixelinfo* dpi) screenCoords.y = w->windowPos.y + window_guest_rides_widgets[WIDX_PAGE_BACKGROUND].bottom - 12; auto ft = Formatter::Common(); - ft.Add(STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE); - if (peep->FavouriteRide != RIDE_ID_NULL) + auto ride = get_ride(peep->FavouriteRide); + if (ride != nullptr) { - auto ride = get_ride(peep->FavouriteRide); - if (ride != nullptr) - { - ride->FormatNameTo(ft); - } + ride->FormatNameTo(ft); } + else + { + ft.Add(STR_PEEP_FAVOURITE_RIDE_NOT_AVAILABLE); + } + DrawTextEllipsised(dpi, screenCoords, w->width - 14, STR_FAVOURITE_RIDE, ft, COLOUR_BLACK); }