mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
This reverts commitsc4816c8and83dd363. 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:
@@ -128,7 +128,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
|||||||
_backpacks = getBackpackCargo _cursorTarget;
|
_backpacks = getBackpackCargo _cursorTarget;
|
||||||
|
|
||||||
//remove old tent
|
//remove old tent
|
||||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_cursorTarget,dayz_authKey,false];
|
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_pos,dayz_authKey,false];
|
||||||
publicVariableServer "PVDZ_obj_Destroy";
|
publicVariableServer "PVDZ_obj_Destroy";
|
||||||
deleteVehicle _cursorTarget;
|
deleteVehicle _cursorTarget;
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ if (_ownerID in [dayz_characterID,dayz_playerUID] or typeOf _obj in _campItems)
|
|||||||
_magazines = getMagazineCargo _obj;
|
_magazines = getMagazineCargo _obj;
|
||||||
_backpacks = getBackpackCargo _obj;
|
_backpacks = getBackpackCargo _obj;
|
||||||
|
|
||||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,dayz_authKey,false];
|
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_pos,dayz_authKey,false];
|
||||||
publicVariableServer "PVDZ_obj_Destroy";
|
publicVariableServer "PVDZ_obj_Destroy";
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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";};
|
if (count _this < 5) exitWith {diag_log "Server_DeleteObj error: Improper parameter format";};
|
||||||
_id = _this select 0;
|
_id = _this select 0;
|
||||||
_uid = _this select 1;
|
_uid = _this select 1;
|
||||||
_activatingPlayer = _this select 2;
|
_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;
|
_clientKey = _this select 4;
|
||||||
_processDelete = if (count _this > 5) then {_this select 5} else {true};
|
_processDelete = if (count _this > 5) then {_this select 5} else {true};
|
||||||
_PlayerUID = getPlayerUID _activatingPlayer;
|
_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 (_exitReason != "") exitWith {diag_log _exitReason};
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
if (_processDelete) then {deleteVehicle _object};
|
if (_processDelete) then {deleteVehicle _objPos};
|
||||||
//remove from database
|
//remove from database
|
||||||
if (parseNumber _id > 0) then {
|
if (parseNumber _id > 0) then {
|
||||||
//Send request
|
//Send request
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
This is useful to hinder and identify cheaters who attempt mass deletion or creation of hive objects via PVS.
|
This is useful to hinder and identify cheaters who attempt mass deletion or creation of hive objects via PVS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_clientKey","_exitReason","_function","_index","_object","_params","_player","_playerUID"];
|
private ["_clientKey","_exitReason","_function","_index","_objPos","_params","_player","_playerUID"];
|
||||||
|
|
||||||
_params = _this select 0;
|
_params = _this select 0;
|
||||||
_function = "Server_" + (_this select 1);
|
_function = "Server_" + (_this select 1);
|
||||||
_object = _this select 2;
|
_objPos = _this select 2; //Can be object or position
|
||||||
_clientKey = _this select 3;
|
_clientKey = _this select 3;
|
||||||
_playerUID = _this select 4;
|
_playerUID = _this select 4;
|
||||||
_player = _this select 5;
|
_player = _this select 5;
|
||||||
@@ -20,7 +20,7 @@ _exitReason = switch true do {
|
|||||||
//If object or player is null distance returns 9999+
|
//If object or player is null distance returns 9999+
|
||||||
//If object or player was moved with setPos on client, position takes a second to update on server
|
//If object or player was moved with setPos on client, position takes a second to update on server
|
||||||
//Coordinates can be used in place of object
|
//Coordinates can be used in place of object
|
||||||
case (_object distance _player > (Z_VehicleDistance + 10)): {
|
case (_objPos distance _player > (Z_VehicleDistance + 10)): {
|
||||||
format["%1 error: Verification failed, player is too far from object. PV ARRAY: %2",_function,_params]
|
format["%1 error: Verification failed, player is too far from object. PV ARRAY: %2",_function,_params]
|
||||||
};
|
};
|
||||||
case (_index < 0): {
|
case (_index < 0): {
|
||||||
|
|||||||
Reference in New Issue
Block a user