diff --git a/Assets/Scripts/Behaviours/NPCPedSpawner.cs b/Assets/Scripts/Behaviours/NPCPedSpawner.cs index 50e10bf2..d94c4c79 100644 --- a/Assets/Scripts/Behaviours/NPCPedSpawner.cs +++ b/Assets/Scripts/Behaviours/NPCPedSpawner.cs @@ -265,8 +265,7 @@ namespace SanAndreasUnity.Behaviours var defaultType = ped.PedDef.DefaultType; - if (defaultType == PedestrianType.Cop - || defaultType == PedestrianType.Criminal) + if (defaultType.IsCop() || defaultType.IsCriminal()) weapon = ped.WeaponHolder.AddWeapon(WeaponId.Pistol); else if (defaultType.IsGangMember()) weapon = ped.WeaponHolder.AddWeapon(WeaponId.MicroUzi); diff --git a/Assets/Scripts/Behaviours/Ped/PedAI.cs b/Assets/Scripts/Behaviours/Ped/PedAI.cs index 0f6aa09b..abbfac43 100644 --- a/Assets/Scripts/Behaviours/Ped/PedAI.cs +++ b/Assets/Scripts/Behaviours/Ped/PedAI.cs @@ -117,8 +117,8 @@ namespace SanAndreasUnity.Behaviours var hitPed = this.MyPed; if (hitPed.PedDef != null && - (hitPed.PedDef.DefaultType == PedestrianType.Criminal || - hitPed.PedDef.DefaultType == PedestrianType.Cop || + (hitPed.PedDef.DefaultType.IsCriminal() || + hitPed.PedDef.DefaultType.IsCop() || hitPed.PedDef.DefaultType.IsGangMember())) { if (attackerPed != null) @@ -488,7 +488,7 @@ namespace SanAndreasUnity.Behaviours } else if (this.Action == PedAIAction.Idle || this.Action == PedAIAction.WalkingAround) { - if (!this.PedestrianType.IsGangMember() && this.PedestrianType != PedestrianType.Criminal) + if (!this.PedestrianType.IsGangMember() && !this.PedestrianType.IsCriminal()) return; this.StartFollowing(recruiterPed);