mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 13:26:39 +03:00
Fix some issues with traps
Removed two unused files. Vanilla commits:42e72463a302726fb1926a7c53ebcf1fb63089959543ea057f
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
_trap = _this select 0;
|
||||
_trigger = _this select 1;
|
||||
|
||||
//Doesn't work on flare and smoke beartraps "due to proxies n stuff"
|
||||
_trap animate ['LeftShutter', 0];
|
||||
_trap animate ['RightShutter', 0];
|
||||
|
||||
_trap setVariable ["armed", true, true];
|
||||
if !(_trap getVariable ["armed", false]) then {
|
||||
_trap setVariable ["armed", true, true];
|
||||
};
|
||||
|
||||
PVDZ_veh_Save = [_trap, "gear"];
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
if (isServer) then {
|
||||
PVDZ_veh_Save call server_updateObject;
|
||||
} else {
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
};
|
||||
|
||||
dayz_traps_active set [count dayz_traps_active, _trap];
|
||||
dayz_traps_trigger set [count dayz_traps_trigger, _trigger];
|
||||
|
||||
@@ -3,9 +3,16 @@ _trap = _this select 0;
|
||||
_trap animate ['LeftShutter', 1];
|
||||
_trap animate ['RightShutter', 1];
|
||||
|
||||
_trap setVariable ["armed", false, true];
|
||||
if (_trap getVariable ["armed", false]) then {
|
||||
_trap setVariable ["armed", false, true];
|
||||
};
|
||||
|
||||
PVDZ_veh_Save = [_trap, "gear"];
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
if (isServer) then {
|
||||
PVDZ_veh_Save call server_updateObject;
|
||||
} else {
|
||||
publicVariableServer "PVDZ_veh_Save";
|
||||
};
|
||||
|
||||
if (_trap in dayz_traps_active) then {
|
||||
deleteVehicle (dayz_traps_trigger select (dayz_traps_active find _trap));
|
||||
|
||||
@@ -7,5 +7,11 @@ _objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
if (isServer) then {
|
||||
[_objectID,_objectUID,"__SERVER__"] call server_deleteObj;
|
||||
} else {
|
||||
[nil,nil,nil,_obj] execVM "\z\addons\dayz_code\actions\remove.sqf";
|
||||
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];
|
||||
publicVariableServer "PVDZ_obj_Destroy";
|
||||
deleteVehicle _obj;
|
||||
};
|
||||
};
|
||||
@@ -10,7 +10,9 @@ if (!isNull _trap) then {
|
||||
if (isNull _trap) exitWith { /* break from loop */ };
|
||||
|
||||
if (((parseNumber _id > 0) || (parseNumber _uid > 0)) && !isNil "_armed") exitWith {
|
||||
dayz_traps set [count dayz_traps, _trap];
|
||||
if (isServer) then {
|
||||
dayz_traps set [count dayz_traps, _trap];
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 0.5;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
_trap = _this select 0;
|
||||
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
|
||||
[_trap] call remove_trap;
|
||||
[_trap,true] call remove_trap;
|
||||
} else {
|
||||
[_trap] call disarm_trap;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user