From 8eea4511b80995d6f93fd86559b3b6bb24e6e919 Mon Sep 17 00:00:00 2001 From: Fate-JH Date: Sun, 3 May 2026 16:22:34 -0400 Subject: [PATCH] failsafe on the failsafe for cargo dismounting (carrier needs to exist, if not a vehicle) --- .../net/psforever/objects/vehicles/CargoBehavior.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/net/psforever/objects/vehicles/CargoBehavior.scala b/src/main/scala/net/psforever/objects/vehicles/CargoBehavior.scala index d90baa787..2a9e9cd97 100644 --- a/src/main/scala/net/psforever/objects/vehicles/CargoBehavior.scala +++ b/src/main/scala/net/psforever/objects/vehicles/CargoBehavior.scala @@ -61,8 +61,10 @@ trait CargoBehavior { def startCargoDismounting(bailed: Boolean): Unit = { if (!startCargoDismountingNoCleanup(bailed)) { - isDismounting = None - CargoObject.MountedIn = None + CargoObject.Zone.GUID(CargoObject.MountedIn).orElse { + isDismounting = None + CargoObject.MountedIn = None + } } }