Add waitUntil in lockVault and unlockVault

Wait for response from server to verify safe was saved and logged before
proceeding with deleting safe object.

Tested and confirmed this solves #1413. Most likely helps with #1503
too.
This commit is contained in:
ebaydayz
2016-02-21 21:31:09 -05:00
parent 81d5976031
commit 9311ac4479
4 changed files with 26 additions and 13 deletions

View File

@@ -42,9 +42,11 @@ _dir = direction _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
if(!isNull _obj) then {
dze_waiting = nil;
PVDZE_log_lockUnlock = [player, _obj,true];
publicVariableServer "PVDZE_log_lockUnlock";
publicVariableServer "PVDZE_log_lockUnlock";
//wait for response from server to verify safe was logged and saved before proceeding
waitUntil {!isNil "dze_waiting"};
//place vault
_holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"];