Fix potential undefined error on bear trap trigger

https://github.com/EpochModTeam/DayZ-Epoch/issues/1891#issuecomment-282476563
This commit is contained in:
ebayShopper
2017-02-25 12:37:32 -05:00
parent e8b328ff9c
commit 55eddfead8
8 changed files with 35 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ _remove = {
_trigger = {
//if (isServer) then {
private ["_entity"];
private "_entity";
_entity = _this select 0;
[nil,_trap,rSAY,["z_trap_trigger_0",60]] call RE;
@@ -68,7 +68,7 @@ _trigger = {
private ["_event", "_trap", "_args"];
_event = _this select 0;
_trap = if (typeOf (_this select 1) == "EmptyDetector") then { dayz_traps_active select (dayz_traps_trigger find (_this select 1)) } else { _this select 1 };
_args = if (count _this > 2) then { _this select 2 } else { [] };
_args = if (count _this > 2) then { _this select 2 } else { [objNull] };
switch (_event) do {
case "init": {