mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-04-18 10:16:39 +03:00
Fix some issues with traps
Removed two unused files. Vanilla commits:42e72463a302726fb1926a7c53ebcf1fb63089959543ea057f
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
sched_traps = {
|
||||
private ["_n","_x"];
|
||||
// EVERY 5 SECONDS
|
||||
// CHECK TRAPS STATE
|
||||
if (!isNil "dayz_traps") then {
|
||||
_n = 0;
|
||||
{
|
||||
if ((isNil "_x") OR {(isNull _x)}) then {
|
||||
dayz_traps = dayz_traps - [_x];
|
||||
}
|
||||
else {
|
||||
if (_x getVariable ["armed", false]) then {
|
||||
if !(_x in dayz_traps_active) then {
|
||||
["arm", _x] call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
|
||||
if !(_x in dayz_traps_active) then { dayz_traps_active set [ count dayz_traps_active, _x ]; };
|
||||
_n = _n + 1;
|
||||
};
|
||||
} else {
|
||||
if (_x in dayz_traps_active) then {
|
||||
["disarm", _x] call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
|
||||
if (_x in dayz_traps_active) then { dayz_traps_active = dayz_traps_active - [_x]; };
|
||||
_n = _n + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach dayz_traps;
|
||||
if (_n > 0) then {
|
||||
diag_log format ["%1: traps polling, changed %2 states", __FILE__, _n];
|
||||
};
|
||||
};
|
||||
|
||||
objNull
|
||||
};
|
||||
Reference in New Issue
Block a user