File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -752,16 +752,20 @@ bool PedestrianStatesManager::StateFalling_ProcessEvent(const PedestrianStateEve
752752
753753void PedestrianStatesManager::StateIdle_ProcessFrame ()
754754{
755+ const PedestrianCtlState& ctlState = mPedestrian ->mCtlState ;
756+
755757 if (mPedestrian ->IsShooting ())
756758 {
757- TryToShoot ();
759+ // pedestrian is in shooting state but does he really want to shoot?
760+ if (ctlState.mCtlActions [ePedestrianAction_Shoot])
761+ {
762+ TryToShoot ();
763+ }
758764 }
759765
760766 ProcessRotateActions ();
761767 ProcessMotionActions ();
762768
763- const PedestrianCtlState& ctlState = mPedestrian ->mCtlState ;
764-
765769 // slide over car
766770 if (ctlState.mCtlActions [ePedestrianAction_Run] || ctlState.mCtlActions [ePedestrianAction_WalkForward])
767771 {
You can’t perform that action at this time.
0 commit comments