1
0
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:
matheusvb3
2025-10-04 19:52:26 -03:00
committed by GitHub
parent 1089b11192
commit d8da02e7dd
7 changed files with 33 additions and 32 deletions

View File

@@ -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();