This commit is contained in:
in0finite 2021-09-13 00:59:28 +02:00
parent adf3b7d31c
commit 45c9ca085d
2 changed files with 4 additions and 5 deletions

View file

@ -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);

View file

@ -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);