Skip to content

Commit

Permalink
Fix #21291: Wrong conditions for hungry guests warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zzril committed Jan 28, 2024
1 parent be9970b commit 7043333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Fix: [#21178] Inca Lost City鈥檚 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 doesn鈥檛 work.
- Fix: [#21291] Hungry guests heading to any flat ride do not count for warning threshold (original bug).

0.4.7 (2023-12-31)
------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/entity/Peep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7043333

Please sign in to comment.