Skip to content

Instantly share code, notes, and snippets.

@ChuangTseu
Created November 18, 2015 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ChuangTseu/a58af39704ed5531b4cd to your computer and use it in GitHub Desktop.
Save ChuangTseu/a58af39704ed5531b4cd to your computer and use it in GitHub Desktop.
fix_R3F_interactions_vehicle_respawn_timeout
From 94209fc53155b924872d779ec683528a840f015e Mon Sep 17 00:00:00 2001
From: ChuangTseu <gan-ning@hotmail.fr>
Date: Wed, 18 Nov 2015 03:07:35 +0100
Subject: [PATCH] Fix (or feature ?) for vehicle interaction via R3F Logistics
(lifting, towing, moving) not resetting the "DesertedTimeout" of the vehicle,
which would then despawn immediately after untowing in some circumstances
(R3F interaction duration > 15 to 45 minutes)
---
server/spawning/vehicleRespawnManager.sqf | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/server/spawning/vehicleRespawnManager.sqf b/server/spawning/vehicleRespawnManager.sqf
index 80e2a92..23dd8f9 100644
--- a/server/spawning/vehicleRespawnManager.sqf
+++ b/server/spawning/vehicleRespawnManager.sqf
@@ -220,6 +220,13 @@ while {true} do
[_respawnPos, _vehClass, _settings] spawn vehicleCreation;
};
};
+ }
+ else
+ {
+ // Beeing towed/lifted or moved means vehicle is "used" and thus not deserted.
+ // Clear "DesertedTimeout" so that it won't disappear just after untowing/dropping or releasing.
+ _settings = _x;
+ [_settings, "DesertedTimeout", 0] call fn_setToPairs;
};
uiSleep (_sleepIter - (diag_tickTime - _startTime));
--
1.9.5.msysgit.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment