mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-18 22:22:57 +03:00
Add better logging for server_deleteObj
This commit is contained in:
@@ -10,7 +10,7 @@ _uid = _this select 1;
|
||||
_activatingPlayer = _this select 2;
|
||||
_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};
|
||||
_processDelete = [true,_this select 5] select (count _this > 5);
|
||||
_PlayerUID = getPlayerUID _activatingPlayer;
|
||||
|
||||
_exitReason = [_this,"DeleteObj",_objPos,_clientKey,_PlayerUID,_activatingPlayer] call server_verifySender;
|
||||
@@ -18,16 +18,21 @@ if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
if (isServer) then {
|
||||
if (_processDelete) then {deleteVehicle _objPos};
|
||||
|
||||
if (typeName _objPos != "ARRAY") then {
|
||||
_objPos = typeof _objPos;
|
||||
};
|
||||
|
||||
//remove from database
|
||||
if (parseNumber _id > 0) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted object with ID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _id];
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with ID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _id, _objPos];
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted object with UID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _uid];
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with UID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _uid, _objPos];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user