Skip to content

Commit

Permalink
fix #42
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamecpp committed Aug 27, 2020
1 parent 763261c commit 44957c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/PedestrianStates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,16 +752,20 @@ bool PedestrianStatesManager::StateFalling_ProcessEvent(const PedestrianStateEve

void PedestrianStatesManager::StateIdle_ProcessFrame()
{
const PedestrianCtlState& ctlState = mPedestrian->mCtlState;

if (mPedestrian->IsShooting())
{
TryToShoot();
// pedestrian is in shooting state but does he really want to shoot?
if (ctlState.mCtlActions[ePedestrianAction_Shoot])
{
TryToShoot();
}
}

ProcessRotateActions();
ProcessMotionActions();

const PedestrianCtlState& ctlState = mPedestrian->mCtlState;

// slide over car
if (ctlState.mCtlActions[ePedestrianAction_Run] || ctlState.mCtlActions[ePedestrianAction_WalkForward])
{
Expand Down

0 comments on commit 44957c3

Please sign in to comment.