mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-19 13:03:11 +01:00
Make peeps not stop on level crossings (#25089)
* Check if actions can be performed safely * Add explanatory comment * Refactor Easter egg logic in Guest::UpdateWalking * Add changelog entry * Make the comment more explanatory * Update NetworkBase.cpp * Update changelog for v0.28
This commit is contained in:
@@ -1229,7 +1229,7 @@ void PeepApplause()
|
||||
GuestReleaseBalloon(peep, peep->z + 9);
|
||||
|
||||
// Clap
|
||||
if ((peep->State == PeepState::Walking || peep->State == PeepState::Queuing) && peep->IsActionInterruptable())
|
||||
if ((peep->State == PeepState::Walking || peep->State == PeepState::Queuing) && peep->IsActionInterruptableSafely())
|
||||
{
|
||||
peep->Action = PeepActionType::Clap;
|
||||
peep->AnimationFrameNum = 0;
|
||||
@@ -1533,6 +1533,15 @@ bool Peep::IsActionInterruptable() const
|
||||
return IsActionIdle() || IsActionWalking();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to avoid peep action and animation triggers that cause them to stop moving and might put them at risk
|
||||
* of getting run over at level crossings, such as guests reading the map and entertainers performing.
|
||||
*/
|
||||
bool Peep::IsActionInterruptableSafely() const
|
||||
{
|
||||
return IsActionInterruptable() && !IsOnLevelCrossing();
|
||||
}
|
||||
|
||||
void PeepSetMapTooltip(Peep* peep)
|
||||
{
|
||||
auto ft = Formatter();
|
||||
|
||||
Reference in New Issue
Block a user