From 591af81575d4181c07f3c78abf81809d4726bdd3 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sun, 2 Oct 2016 22:30:38 -0400 Subject: [PATCH] Add exit in fn_waitForObject.sqf This is just in case something goes very wrong (like bad server lag) and the object doesn't spawn. --- SQF/dayz_code/compile/fn_waitForObject.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/compile/fn_waitForObject.sqf b/SQF/dayz_code/compile/fn_waitForObject.sqf index b213b0450..56fdc3f8c 100644 --- a/SQF/dayz_code/compile/fn_waitForObject.sqf +++ b/SQF/dayz_code/compile/fn_waitForObject.sqf @@ -19,10 +19,11 @@ _near = count (nearestObjects [player,[_class],50]); _class = _this select 0; _sign = _this select 1; _near = _this select 2; + _time = diag_tickTime; waitUntil { uiSleep 1; - (count (nearestObjects [player,[_class],50]) != _near) + (count (nearestObjects [player,[_class],50]) != _near or (diag_tickTime - _time > 15)) }; if (!isNull _sign) then {