This commit is contained in:
in0finite 2021-09-12 04:11:07 +02:00
parent c71b7f41bc
commit 4167d76bfb

View file

@ -163,7 +163,14 @@ namespace SanAndreasUnity.Behaviours
{
// follow target ped
if (this.TargetPed != null) {
if (null == this.TargetPed)
{
this.Action = PedAIAction.Idle;
return;
}
{
Vector3 targetPos = this.TargetPed.transform.position;
float currentStoppingDistance = 3f;
@ -219,10 +226,6 @@ namespace SanAndreasUnity.Behaviours
}
}
else
{
this.Action = PedAIAction.Idle;
}
}
public void StartWalkingAround(PathNode pathNode)