Script: when changing staff type, reset state to walking

Reset state to walking to prevent invalid actions from carrying over
This commit is contained in:
Aaron van Geffen 2024-04-28 15:26:24 +02:00
parent 03926c46d0
commit 1a47acf276
1 changed files with 4 additions and 0 deletions

View File

@ -84,6 +84,10 @@ namespace OpenRCT2::Scripting
peep->AssignedStaffType = StaffType::Entertainer;
peep->SpriteType = PeepSpriteType::EntertainerPanda;
}
// Reset state to walking to prevent invalid actions from carrying over
peep->Action = PeepActionType::Walking;
peep->ActionSpriteType = peep->NextActionSpriteType = PeepActionSpriteType::None;
}
}