From 1f0764be283f20de76efa8da7f63fc4a1559caec Mon Sep 17 00:00:00 2001 From: ffrogman Date: Thu, 26 Nov 2020 13:04:35 -0500 Subject: [PATCH] Fix #13427: Newly created Go-Karts show "Race won by " (#13457) * Fix #13427. Show # of people for newly created Go-Karts * Add changelog entry * Reorder changelog entry --- distribution/changelog.txt | 1 + src/openrct2/ride/Ride.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index f663cfd12c..169adc51b5 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -7,6 +7,7 @@ - Fix: [#13257] Rides that are exactly the minimum objective length are not counted. - Fix: [#13334] Uninitialised variables in CustomTabDesc. - Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface. +- Fix: [#13427] Newly created Go-Karts show "Race won by ". - Fix: [#13454] Plug-ins do not load on Windows if the user directory contains non-ASCII characters. - Improved: [#12917] Changed peep movement so that they stay more spread out over the full width of single tile paths. - Removed: [#13423] Built-in explode guests cheat (replaced by plug-in). diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index ec2d47183e..4b90b6ed49 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -839,7 +839,9 @@ void Ride::FormatStatusTo(Formatter& ft) const { ft.Add(STR_TEST_RUN); } - else if (mode == RideMode::Race && !(lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING)) + else if ( + mode == RideMode::Race && !(lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + && race_winner != SPRITE_INDEX_NULL) { auto peep = GetEntity(race_winner); if (peep != nullptr)