Greatly optimize safe gear handling

- Safe inventory arrays are no longer sent over network to all machines
on server startup and on each lock/unlock
- Disabled user input then closed gear dialog during safe
lock/unlock/pack to block various duping methods.
- Moved safe creation, deletion and gear handling to server. This cuts
down on add[Magazine/Weapon/Backpack]Cargo, createVehicle and
deleteVehicle BE logs.
This commit is contained in:
ebaydayz
2016-08-10 20:33:48 -04:00
parent f186e256cb
commit 72656ed001
12 changed files with 225 additions and 238 deletions

View File

@@ -1,3 +1,14 @@
/*
1. Waits for an object to be created and then reveals it to the player.
2. Optionally deletes a temporary sign or marker placeholder object.
Parameters:
_this select 0: string - object class name to reveal
_this select 1: object - sign object or ObjNull if none
["objectClassName", objNull] spawn fn_waitForObject;
*/
private ["_object","_sign"];
_object = _this select 0;
@@ -8,5 +19,8 @@ waitUntil {
!isNull (nearestObject [player,_object])
};
deleteVehicle _sign;
if (!isNull _sign) then {
deleteVehicle _sign;
};
player reveal (nearestObject [player,_object]);