mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Remove ObjectID and ObjectUID from PVDZ_obj_Destroy calls
This is just the first commit for the removel of all global set ObjectIDs and ObjectUIDs. Also objects will no longer be send over the network. Only the netID will. The actual object can be resolved with the netID on the server.
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
private ["_obj","_objectID","_objectUID"];
|
||||
|
||||
_obj = _this select 0;
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
local _obj = _this select 0;
|
||||
|
||||
if (isServer) then {
|
||||
local _objectID = _obj getVariable ["ObjectID","0"];
|
||||
local _objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
[_objectID,_objectUID,_obj] call server_deleteObjDirect;
|
||||
} else {
|
||||
if (count _this == 2) then {
|
||||
//single use trap triggered, remove with no animation
|
||||
//For normal remove let object_pickup.sqf perform deletion to ensure player has room in gear first, no others remove at same time and animation runs
|
||||
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,dayz_authKey];
|
||||
PVDZ_obj_Destroy = [netID player,netID _obj,dayz_authKey];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
//deleteVehicle _obj;
|
||||
};
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
private ["_id", "_uid", "_armed"];
|
||||
_trap = _this select 0;
|
||||
local _trap = _this select 0;
|
||||
|
||||
if (!isNull _trap) then {
|
||||
while { true } do {
|
||||
_id = _trap getVariable ["ObjectID", "0"];
|
||||
_uid = _trap getVariable ["ObjectUID", "0"];
|
||||
_armed = _trap getVariable "armed";
|
||||
|
||||
local _armed = _trap getVariable "armed";
|
||||
|
||||
if (isNull _trap) exitWith { /* break from loop */ };
|
||||
|
||||
if (((parseNumber _id > 0) || (parseNumber _uid > 0)) && !isNil "_armed") exitWith {
|
||||
if (!isNil "_armed") exitWith {
|
||||
if (isServer) then {
|
||||
dayz_traps set [count dayz_traps, _trap];
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
_trap = _this select 0;
|
||||
local _trap = _this select 0;
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
|
||||
[_trap,true] call remove_trap;
|
||||
|
||||
Reference in New Issue
Block a user