mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 20:13:02 +00:00
exit Chase state if there is no weapon or no ammo
This commit is contained in:
parent
8322c737a6
commit
51545ef571
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
|
|||
{
|
||||
this.ChooseBestWeapon();
|
||||
|
||||
if (null == _ped.CurrentWeapon)
|
||||
{
|
||||
// we have no weapon to attack with, or no ammo
|
||||
_pedAI.StartWalkingAround();
|
||||
return;
|
||||
}
|
||||
|
||||
if (null == this.TargetPed)
|
||||
{
|
||||
this.TargetPed = this.GetNextPedToAttack();
|
||||
|
|
Loading…
Reference in a new issue