mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 09:29:21 +03:00
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:
@@ -58,7 +58,7 @@ if ((count _VehKey2) > 0) then {
|
||||
if (isNil "_localResult2") then {
|
||||
_localResult2 = 0;
|
||||
} else {
|
||||
PVDZ_obj_Destroy = [(_VehKey2 select 2),(_VehKey2 select 3),player];
|
||||
PVDZ_obj_Destroy = [(_VehKey2 select 2),(_VehKey2 select 3),player,(_VehKey2 select 1),DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
deleteVehicle (_VehKey2 select 1);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@ if (_proceed) then {
|
||||
|
||||
format [localize "STR_BLD_DISMANTLED",typeOf _object] call dayz_rollingMessages;
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_object,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
if (isServer) then {
|
||||
PVDZ_obj_Destroy call server_deleteObj;
|
||||
PVDZ_obj_Destroy call server_deleteObjDirect;
|
||||
};
|
||||
|
||||
//Need to update for sanity no client should ever create or delete anything
|
||||
|
||||
@@ -79,7 +79,7 @@ if (_isOk) then {
|
||||
["PartWoodPile",1,1] call fn_dropItem;
|
||||
["equip_duct_tape",1,1] call fn_dropItem;
|
||||
};
|
||||
PVDZ_obj_Destroy = [(_holder getVariable["ObjectID","0"]),(_holder getVariable["ObjectUID","0"]),player];
|
||||
PVDZ_obj_Destroy = [(_holder getVariable["ObjectID","0"]),(_holder getVariable["ObjectUID","0"]),player,_holder,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
};
|
||||
deleteVehicle _holder;
|
||||
|
||||
@@ -128,7 +128,7 @@ if ((_startUpgrade) AND (isClass(_upgradeConfig))) then {
|
||||
_backpacks = getBackpackCargo _cursorTarget;
|
||||
|
||||
//remove old tent
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_cursorTarget,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
deleteVehicle _cursorTarget;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ _object setVariable ["characterID",_characterID,true];
|
||||
|
||||
//remove old object
|
||||
deleteVehicle _cursorTarget;
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_object,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
// create a weaponholder with dismissed parts
|
||||
|
||||
@@ -65,12 +65,12 @@ player addMagazine _emptycan;
|
||||
// Added Nutrition-Factor for work
|
||||
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
//Send killed for object
|
||||
if (isServer) then {
|
||||
PVDZ_obj_Destroy call server_deleteObj;
|
||||
PVDZ_obj_Destroy call server_deleteObjDirect;
|
||||
} else {
|
||||
PVDZ_veh_Save = [_obj, "killed"];
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
|
||||
@@ -154,7 +154,7 @@ if (_proceed && _success) then {
|
||||
deleteVehicle _obj;
|
||||
|
||||
if(!_isWreck && !_isWreckBuilding) then {
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
};
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ if (_finished) then {
|
||||
|
||||
//if(_objectID != "0" && _objectUID != "0") then {
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -156,7 +156,7 @@ if (_qty >= _qty_in) then {
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -159,7 +159,7 @@ if (_finished) then {
|
||||
|
||||
if(local _obj && !isNull _obj && alive _obj && !_notSetup) then {
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -142,7 +142,7 @@ if (_qty >= _qty_in) then {
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -189,7 +189,7 @@ if (_finished) then {
|
||||
|
||||
//if(_objectID != "0" && _objectUID != "0") then {
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -185,7 +185,7 @@ if (_finished) then {
|
||||
|
||||
//if(_objectID != "0" && _objectUID != "0") then {
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
@@ -163,7 +163,7 @@ if (_qty >= _qty_in) then {
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer];
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,_activatingPlayer,_obj,DZE_AuthKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
Reference in New Issue
Block a user