Add cleanup

This commit is contained in:
in0finite 2019-04-29 02:28:40 +02:00
parent 9a5d6a3ec6
commit 8026142938

View file

@ -8,11 +8,18 @@ namespace SanAndreasUnity.Behaviours.Peds.States
public class VehicleExitingState : BaseVehicleState
{
Coroutine m_coroutine;
public override void OnBecameInactive()
{
this.Cleanup();
public override void OnBecameActive() {
if (m_coroutine != null)
StopCoroutine(m_coroutine);
m_coroutine = null;
base.OnBecameInactive();
}
public void ExitVehicle(bool immediate = false)