Skip to content

Commit

Permalink
Script: when changing staff type, reset state to walking
Browse files Browse the repository at this point in the history
Reset state to walking to prevent invalid actions from carrying over
  • Loading branch information
AaronVanGeffen committed May 1, 2024
1 parent 339a572 commit 17920b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/openrct2/scripting/bindings/entity/ScStaff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 17920b6

Please sign in to comment.