From 7b8d2a1a1a1bbee1ab928d358d39587b6f3c60a7 Mon Sep 17 00:00:00 2001 From: in0finite Date: Sun, 17 Oct 2021 00:57:11 +0200 Subject: [PATCH] fix for choosing best weapon --- Assets/Scripts/Behaviours/PedAI/ChaseState.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Behaviours/PedAI/ChaseState.cs b/Assets/Scripts/Behaviours/PedAI/ChaseState.cs index 69882065..265e8134 100644 --- a/Assets/Scripts/Behaviours/PedAI/ChaseState.cs +++ b/Assets/Scripts/Behaviours/PedAI/ChaseState.cs @@ -18,7 +18,6 @@ namespace SanAndreasUnity.Behaviours.Peds.AI WeaponSlot.Heavy, WeaponSlot.Shotgun, WeaponSlot.Pistol, - WeaponSlot.Hand, // switch to Hand if there is no ammo in other weapons }; @@ -178,6 +177,8 @@ namespace SanAndreasUnity.Behaviours.Peds.AI return; } } + + _ped.WeaponHolder.SwitchWeapon(WeaponSlot.Hand); } } } \ No newline at end of file