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.
This commit is contained in:
ebaydayz
2016-10-02 22:30:38 -04:00
parent 8196c2343a
commit 591af81575

View File

@@ -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 {