mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 17:42:29 +01:00
Check if guest action is interruptable
This fixes a bug where the waving or eating animations for the guests could suddenly reset while it was already playing
This commit is contained in:
@@ -265,6 +265,8 @@ void Peep::UpdateWaitingAtCrossing()
|
||||
SwitchNextAnimationType();
|
||||
|
||||
if (auto* guest = As<Guest>(); guest != nullptr)
|
||||
{
|
||||
if (guest->IsActionInterruptable())
|
||||
{
|
||||
if (guest->HasFoodOrDrink())
|
||||
{
|
||||
@@ -282,6 +284,7 @@ void Peep::UpdateWaitingAtCrossing()
|
||||
AnimationImageIdOffset = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UpdateCurrentAnimationType();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user