mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +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();
|
SwitchNextAnimationType();
|
||||||
|
|
||||||
if (auto* guest = As<Guest>(); guest != nullptr)
|
if (auto* guest = As<Guest>(); guest != nullptr)
|
||||||
|
{
|
||||||
|
if (guest->IsActionInterruptable())
|
||||||
{
|
{
|
||||||
if (guest->HasFoodOrDrink())
|
if (guest->HasFoodOrDrink())
|
||||||
{
|
{
|
||||||
@@ -282,6 +284,7 @@ void Peep::UpdateWaitingAtCrossing()
|
|||||||
AnimationImageIdOffset = 0;
|
AnimationImageIdOffset = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateCurrentAnimationType();
|
UpdateCurrentAnimationType();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user