This reverts commits c4816c8 and 83dd363.

These were not errors, oiad did not properly update his dayz_server
before testing.

Renamed variables and added comments to clarify object or position can
be used
This commit is contained in:
ebayShopper
2017-11-18 11:39:41 -05:00
parent c4816c8d18
commit 9d64d318f6
4 changed files with 10 additions and 10 deletions

View File

@@ -1,23 +1,23 @@
/*
[_objectID,_objectUID,_activatingPlayer,_object,dayz_authKey] call server_deleteObj;
[_objectID,_objectUID,_activatingPlayer,_objPos,dayz_authKey] call server_deleteObj;
For PV calls from the client use this function, otherwise if calling directly from the server use server_deleteObjDirect
*/
private["_id","_uid","_key","_activatingPlayer","_object","_clientKey","_exitReason","_PlayerUID","_processDelete"];
private["_id","_uid","_key","_activatingPlayer","_objPos","_clientKey","_exitReason","_PlayerUID","_processDelete"];
if (count _this < 5) exitWith {diag_log "Server_DeleteObj error: Improper parameter format";};
_id = _this select 0;
_uid = _this select 1;
_activatingPlayer = _this select 2;
_object = _this select 3;
_objPos = _this select 3; //Can be object or position if _processDelete is false
_clientKey = _this select 4;
_processDelete = if (count _this > 5) then {_this select 5} else {true};
_PlayerUID = getPlayerUID _activatingPlayer;
_exitReason = [_this,"DeleteObj",_object,_clientKey,_PlayerUID,_activatingPlayer] call server_verifySender;
_exitReason = [_this,"DeleteObj",_objPos,_clientKey,_PlayerUID,_activatingPlayer] call server_verifySender;
if (_exitReason != "") exitWith {diag_log _exitReason};
if (isServer) then {
if (_processDelete) then {deleteVehicle _object};
if (_processDelete) then {deleteVehicle _objPos};
//remove from database
if (parseNumber _id > 0) then {
//Send request