mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-15 00:37:09 +00:00
fix some errors
This commit is contained in:
parent
14236b8342
commit
7ddb5d0556
2 changed files with 2 additions and 7 deletions
|
@ -203,14 +203,14 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
|
|||
|
||||
bool IsMemberOfOurGroup(Ped ped)
|
||||
{
|
||||
if (this.Action != PedAIAction.Following || this.TargetPed == null) // we are not part of any group
|
||||
if (this.TargetPed == null) // we are not part of any group
|
||||
return false;
|
||||
|
||||
if (this.TargetPed == ped) // our leader
|
||||
return true;
|
||||
|
||||
var pedAI = ped.GetComponent<PedAI>();
|
||||
if (pedAI != null && pedAI.Action == PedAIAction.Following && pedAI.TargetPed == this.TargetPed)
|
||||
if (pedAI != null && pedAI.CurrentState is FollowState followState && followState.TargetPed == this.TargetPed)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
@ -30,11 +30,6 @@ namespace SanAndreasUnity.Behaviours.Peds.AI
|
|||
|
||||
public bool HasTargetNode { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// The ped that this ped is chasing
|
||||
/// </summary>
|
||||
public Ped TargetPed { get; private set; }
|
||||
|
||||
public Ped MyPed { get; private set; }
|
||||
|
||||
public PedestrianType PedestrianType => this.MyPed.PedDef.DefaultType;
|
||||
|
|
Loading…
Reference in a new issue