From 867ac634afb973ebe81253189e8acacb8ea741ce Mon Sep 17 00:00:00 2001 From: in0finite Date: Sun, 12 Sep 2021 21:14:48 +0200 Subject: [PATCH] add StartIdling() --- Assets/Scripts/Behaviours/Ped/PedAI.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Behaviours/Ped/PedAI.cs b/Assets/Scripts/Behaviours/Ped/PedAI.cs index 282a251b..d0f48a92 100644 --- a/Assets/Scripts/Behaviours/Ped/PedAI.cs +++ b/Assets/Scripts/Behaviours/Ped/PedAI.cs @@ -228,7 +228,7 @@ namespace SanAndreasUnity.Behaviours { if (null == this.TargetPed) { - this.Action = PedAIAction.Idle; + this.StartIdling(); return; } @@ -260,7 +260,7 @@ namespace SanAndreasUnity.Behaviours if (null == this.TargetPed) { - this.Action = PedAIAction.Idle; + this.StartIdling(); return; } @@ -361,6 +361,13 @@ namespace SanAndreasUnity.Behaviours } } + public void StartIdling() + { + this.Action = PedAIAction.Idle; + this.HasCurrentNode = false; + this.HasTargetNode = false; + } + public void StartWalkingAround(PathNode pathNode) { this.CurrentNode = pathNode;