mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
aa0b49de7b
commit
4e8ea47e1b
|
@ -68,9 +68,9 @@ set(OBJECTS_VERSION "1.2.6")
|
|||
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip")
|
||||
set(OBJECTS_SHA1 "cd86dd2e42edb513b18293ef7ae52a93a7cdfc57")
|
||||
|
||||
set(REPLAYS_VERSION "0.0.65")
|
||||
set(REPLAYS_VERSION "0.0.66")
|
||||
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip")
|
||||
set(REPLAYS_SHA1 "CE3796062BF3FDDC3FA3C8FC2F0DDD8EE9314174")
|
||||
set(REPLAYS_SHA1 "0A7783293EB9C262DC634BB181990D7C54807433")
|
||||
|
||||
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
||||
option(WITH_TESTS "Build tests")
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
- Change: [#16424] Following an entity in the title sequence no longer toggles underground view when it's underground.
|
||||
- Change: [#16493] Boat Hire and Submarine Ride support costs now match their visual appearance.
|
||||
- Change: [#16710] Changed default view of Guest List to 'Thoughts' and selected tab will default to 'Summarised' (when opened from the menu).
|
||||
- Change: [#16859] Guests with umbrellas no longer always avoid going into a Maze.
|
||||
- Fix: [#11752] Track pieces with fractional cost are too cheap to build.
|
||||
- Fix: [#12556] Allow game to run without audio devices.
|
||||
- Fix: [#12774] [Plugin] Scripts will not be re-initialised when a new scenario is loaded from within a running scenario.
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
||||
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.2.6/objects.zip</ObjectsUrl>
|
||||
<ObjectsSha1>cd86dd2e42edb513b18293ef7ae52a93a7cdfc57</ObjectsSha1>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.65/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha1>CE3796062BF3FDDC3FA3C8FC2F0DDD8EE9314174</ReplaysSha1>
|
||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.66/replays.zip</ReplaysUrl>
|
||||
<ReplaysSha1>0A7783293EB9C262DC634BB181990D7C54807433</ReplaysSha1>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -332,6 +332,7 @@ public:
|
|||
bool HeadingForRideOrParkExit() const;
|
||||
void StopPurchaseThought(uint8_t ride_type);
|
||||
void TryGetUpFromSitting();
|
||||
bool ShouldRideWhileRaining(const Ride& ride);
|
||||
void ChoseNotToGoOnRide(Ride* ride, bool peepAtRide, bool updateLastRide);
|
||||
void PickRideToGoOn();
|
||||
void ReadMap();
|
||||
|
|
|
@ -275,6 +275,7 @@ enum ride_type_flags : uint64_t
|
|||
RIDE_TYPE_FLAG_IS_SUSPENDED = (1ULL << 50),
|
||||
RIDE_TYPE_FLAG_HAS_LANDSCAPE_DOORS = (1ULL << 51),
|
||||
RIDE_TYPE_FLAG_UP_INCLINE_REQUIRES_LIFT = (1ULL << 52),
|
||||
RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA = (1ULL << 53),
|
||||
};
|
||||
|
||||
// Set on ride types that have a main colour, additional colour and support colour.
|
||||
|
|
|
@ -25,7 +25,8 @@ constexpr const RideTypeDescriptor MazeRTD =
|
|||
SET_FIELD(StartTrackPiece, TrackElemType::Maze),
|
||||
SET_FIELD(TrackPaintFunction, get_track_paint_function_maze),
|
||||
SET_FIELD(Flags, RIDE_TYPE_FLAG_HAS_TRACK_COLOUR_SUPPORTS | RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION | RIDE_TYPE_FLAG_NO_TEST_MODE | RIDE_TYPE_FLAG_NO_VEHICLES |
|
||||
RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY),
|
||||
RIDE_TYPE_FLAG_TRACK_NO_WALLS | RIDE_TYPE_FLAG_IN_RIDE | RIDE_TYPE_FLAG_HAS_TRACK | RIDE_TYPE_FLAG_HAS_ENTRANCE_EXIT | RIDE_TYPE_FLAG_LIST_VEHICLES_SEPARATELY |
|
||||
RIDE_TYPE_FLAG_PEEP_CAN_USE_UMBRELLA),
|
||||
SET_FIELD(RideModes, EnumsToFlags(RideMode::Maze)),
|
||||
SET_FIELD(DefaultMode, RideMode::Maze),
|
||||
SET_FIELD(OperatingSettings, { 1, 64, 0, 0, 0, 0 }),
|
||||
|
|
Loading…
Reference in New Issue