Files
DayZ-Epoch/SQF/dayz_code/compile/fn_waitForObject.sqf
ebaydayz 72656ed001 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.
2016-08-10 20:34:54 -04:00

26 lines
582 B
Plaintext

/*
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;
_sign = _this select 1;
waitUntil {
uiSleep 1;
!isNull (nearestObject [player,_object])
};
if (!isNull _sign) then {
deleteVehicle _sign;
};
player reveal (nearestObject [player,_object]);