Fix #21291: Wrong conditions for hungry guests warning

In `PeepProblemWarningsUpdate()`, when determining the number of hungry guests that need help (in order to check whether the threshold for showing the warning about hungry guests is reached), guests that are heading towards any flat ride (checked using the `RIDE_TYPE_FLAG_FLAT_RIDE` on the ride the guest is heading to (if any)) are discarded.  
For thirsty guests (and those needing to go to the toilet) on the other hand, the more specific `RIDE_TYPE_FLAG_SELLS_DRINKS` (or `RIDE_TYPE_FLAG_IS_TOILET`) is used. (So, a guest that becomes thirsty while on its way to the merry-go-round would count for the threshold here.)

This PR makes the function use the more specific `RIDE_TYPE_FLAG_SELLS_FOOD` for hungry guests, so it's consistent with the other cases.
This commit is contained in:
Severin Paul Höfer 2024-01-29 00:35:17 +01:00 committed by GitHub
parent be9970b274
commit 704333344e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -21,6 +21,7 @@
- Fix: [#21178] Inca Lost Citys scenario description incorrectly states there are height restrictions.
- Fix: [#21179] Additional missing land/construction rights tiles in Inca Lost City & Renovation.
- Fix: [#21198] [Plugin] Setting brake or booster speeds on a tile element doesnt work.
- Fix: [#21291] Hungry guests heading to any flat ride do not count for warning threshold (original bug).
0.4.7 (2023-12-31)
------------------------------------------------------------------------

View file

@ -1075,7 +1075,7 @@ void PeepProblemWarningsUpdate()
break;
}
ride = GetRide(peep->GuestHeadingToRideId);
if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE))
if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SELLS_FOOD))
hungerCounter++;
break;