mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 07:14:31 +01:00
Guests with umbrellas no longer always avoid Maze when it rains (#16859)
Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
@@ -2053,9 +2053,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b
|
||||
}
|
||||
}
|
||||
|
||||
// Peeps won't go on rides that aren't sufficiently undercover while it's raining.
|
||||
// The threshold is fairly low and only requires about 10-15% of the ride to be undercover.
|
||||
if (climate_is_raining() && (ride->sheltered_eighths) < 3)
|
||||
if (climate_is_raining() && !ShouldRideWhileRaining(*ride))
|
||||
{
|
||||
if (peepAtRide)
|
||||
{
|
||||
@@ -2348,6 +2346,25 @@ int32_t Guest::GetParkEntryTime() const
|
||||
return ParkEntryTime;
|
||||
}
|
||||
|
||||
bool Guest::ShouldRideWhileRaining(const Ride& ride)
|
||||
{
|
||||
// Peeps will go on rides that are sufficiently undercover while it's raining.
|
||||
// The threshold is fairly low and only requires about 10-15% of the ride to be undercover.
|
||||
if (ride.sheltered_eighths >= 3)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Peeps with umbrellas will go on rides where they can use their umbrella on it (like the Maze) 50% of the time
|
||||
if (HasItem(ShopItem::Umbrella) && ride.GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA)
|
||||
&& (scenario_rand() & 2) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Guest::ChoseNotToGoOnRide(Ride* ride, bool peepAtRide, bool updateLastRide)
|
||||
{
|
||||
if (peepAtRide && updateLastRide)
|
||||
@@ -4807,7 +4824,7 @@ void Guest::UpdateRideMazePathfinding()
|
||||
|
||||
if (IsActionInterruptable())
|
||||
{
|
||||
if (Energy > 64 && (scenario_rand() & 0xFFFF) <= 2427)
|
||||
if (Energy > 64 && (scenario_rand() & 0xFFFF) <= 2427 && !climate_is_raining())
|
||||
{
|
||||
Action = PeepActionType::Jump;
|
||||
ActionFrame = 0;
|
||||
|
||||
Reference in New Issue
Block a user