From d98643e70cf674da2cd09a97dae2186b3966a18c Mon Sep 17 00:00:00 2001 From: in0finite Date: Sat, 20 Jun 2020 20:17:22 +0200 Subject: [PATCH] explode exception-safe --- Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs index 8cb2f02f..c3aeff09 100644 --- a/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs +++ b/Assets/Scripts/Behaviours/Vehicles/Vehicle_Damage.cs @@ -82,6 +82,11 @@ namespace SanAndreasUnity.Behaviours.Vehicles } public void Explode() + { + F.RunExceptionSafe(() => this.ExplodeInternal()); + } + + private void ExplodeInternal() { if (m_alreadyExploded) return;