diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index 9ef22c2d8..74c746130 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -85,6 +85,7 @@ [FIXED] Mark body now marks all of your bodies instead of just one. @oiad [FIXED] Group and body markers correctly update on the GPS mini map now. [FIXED] Vehicle lock and unlock actions are now refreshed correctly without needing to look away and back again. @oiad +[FIXED] A potential undefined error on bear trap trigger. @oiad [NOTE] The fixes below are included in the 1.0.6 Build C server package released December 29th, 2016 (http://dayzepoch.com/a2dayzepoch.php) [FIXED] Hive child 309 errors that resulted in broken saving of newly built storage object inventory. @icomrade diff --git a/SQF/dayz_code/traps/beartrap.sqf b/SQF/dayz_code/traps/beartrap.sqf index 11295d3a5..b8730a720 100644 --- a/SQF/dayz_code/traps/beartrap.sqf +++ b/SQF/dayz_code/traps/beartrap.sqf @@ -50,18 +50,20 @@ _remove = { _trigger = { if (isServer) then { - private ["_entity"]; + private "_entity"; _entity = _this select 0; _trap animate ["LeftShutter", 1]; _trap animate ["RightShutter", 1]; [nil,_trap,rSAY,["trap_bear_0",60]] call RE; - - if (_entity isKindOf "Animal") then { - _entity setDamage 1; - } else { - [_entity, "Legs", [_entity]] call server_sendToClient; + + if (!isNull _entity) then { + if (_entity isKindOf "Animal") then { + _entity setDamage 1; + } else { + [_entity, "Legs", [_entity]] call server_sendToClient; + }; }; [_trap] call trigger_trap; @@ -71,7 +73,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": { diff --git a/SQF/dayz_code/traps/beartrapflare.sqf b/SQF/dayz_code/traps/beartrapflare.sqf index 4e82735c8..41ec460c7 100644 --- a/SQF/dayz_code/traps/beartrapflare.sqf +++ b/SQF/dayz_code/traps/beartrapflare.sqf @@ -51,7 +51,7 @@ _remove = { _trigger = { if (isServer) then { - private ["_entity"]; + private "_entity"; _entity = _this select 0; // don't work (due to proxies n stuff) @@ -59,11 +59,13 @@ _trigger = { //_trap animate ["RightShutter", 1]; [nil,_trap,rSAY,["trap_bear_0",60]] call RE; - - if (_entity isKindOf "Animal") then { - _entity setDamage 1; - } else { - [_entity, "Legs", [_entity]] call server_sendToClient; + + if (!isNull _entity) then { + if (_entity isKindOf "Animal") then { + _entity setDamage 1; + } else { + [_entity, "Legs", [_entity]] call server_sendToClient; + }; }; _flare = createVehicle ["RoadFlare", getPosATL _trap, [], 0, "CAN_COLLIDE"]; @@ -90,7 +92,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": { diff --git a/SQF/dayz_code/traps/beartrapsmoke.sqf b/SQF/dayz_code/traps/beartrapsmoke.sqf index 1acda5189..6c456b538 100644 --- a/SQF/dayz_code/traps/beartrapsmoke.sqf +++ b/SQF/dayz_code/traps/beartrapsmoke.sqf @@ -51,7 +51,7 @@ _remove = { _trigger = { if (isServer) then { - private ["_entity"]; + private "_entity"; _entity = _this select 0; // don't work (due to proxies n stuff) @@ -60,10 +60,12 @@ _trigger = { [nil,_trap,rSAY,["trap_bear_0",60]] call RE; - if (_entity isKindOf "Animal") then { - _entity setDamage 1; - } else { - [_entity, "Legs", [_entity]] call server_sendToClient; + if (!isNull _entity) then { + if (_entity isKindOf "Animal") then { + _entity setDamage 1; + } else { + [_entity, "Legs", [_entity]] call server_sendToClient; + }; }; createVehicle ["SmokeShell", getPosATL _trap, [], 0, "CAN_COLLIDE"]; @@ -86,7 +88,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": { diff --git a/SQF/dayz_code/traps/tripcans.sqf b/SQF/dayz_code/traps/tripcans.sqf index fc9078c1d..af6e2b0ba 100644 --- a/SQF/dayz_code/traps/tripcans.sqf +++ b/SQF/dayz_code/traps/tripcans.sqf @@ -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; @@ -64,7 +64,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": { diff --git a/SQF/dayz_code/traps/tripflare.sqf b/SQF/dayz_code/traps/tripflare.sqf index c271d2230..95f9bccf1 100644 --- a/SQF/dayz_code/traps/tripflare.sqf +++ b/SQF/dayz_code/traps/tripflare.sqf @@ -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; @@ -72,7 +72,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": { diff --git a/SQF/dayz_code/traps/tripgrenade.sqf b/SQF/dayz_code/traps/tripgrenade.sqf index 9351cc593..b996a691f 100644 --- a/SQF/dayz_code/traps/tripgrenade.sqf +++ b/SQF/dayz_code/traps/tripgrenade.sqf @@ -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": { diff --git a/SQF/dayz_code/traps/tripsmoke.sqf b/SQF/dayz_code/traps/tripsmoke.sqf index 077906ecb..41b76c08f 100644 --- a/SQF/dayz_code/traps/tripsmoke.sqf +++ b/SQF/dayz_code/traps/tripsmoke.sqf @@ -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": {