From de9d01fc952b4687972aaa615c15574974c10376 Mon Sep 17 00:00:00 2001 From: in0finite Date: Sat, 16 Oct 2021 20:55:58 +0200 Subject: [PATCH] exit vehicle when in Chase state --- Assets/Scripts/Behaviours/PedAI/ChaseState.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Scripts/Behaviours/PedAI/ChaseState.cs b/Assets/Scripts/Behaviours/PedAI/ChaseState.cs index de506b62..66aae8e3 100644 --- a/Assets/Scripts/Behaviours/PedAI/ChaseState.cs +++ b/Assets/Scripts/Behaviours/PedAI/ChaseState.cs @@ -65,6 +65,12 @@ namespace SanAndreasUnity.Behaviours.Peds.AI return; } + if (_ped.IsInVehicle) + { + _ped.OnSubmitPressed(); + return; + } + this.UpdateAttackOnPed(this.TargetPed, ref _wasInRange); }