Rudimentary auth for DeleteObj

limits distance to object, as well as validating random auth key.  added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
This commit is contained in:
icomrade
2017-07-29 21:09:20 -04:00
parent 9b3ccaaa02
commit 8035df0ba0
27 changed files with 90 additions and 39 deletions

View File

@@ -67,16 +67,15 @@ for "_i" from 1 to 20 do {
waitUntil {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "disableWeapons") == 1};
};
// remove object
deleteVehicle _cursorTarget;
_cursorTarget = objNull;
if (_realObjectStillThere) then { // send to server the destroy request
_realObjectStillThere = false;
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_cursorTarget,DZE_AuthKey];
publicVariableServer "PVDZ_obj_Destroy";
diag_log [diag_ticktime, __FILE__, "Networked object, request to destroy", PVDZ_obj_Destroy];
};
// remove object
deleteVehicle _cursorTarget;
_cursorTarget = objNull;
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;