From bb3869f1b314264e50a65bc9d76455c31c4fe214 Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Tue, 17 Jan 2017 19:58:40 +0100 Subject: [PATCH 01/15] Added localUnits EH Code by @Commy2 --- addons/common/XEH_postInit.sqf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 68920a7a5cc..57c179cce28 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -137,6 +137,25 @@ if (isServer) then { [QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler; }; +//Eventhandlers to maintain array of localUnits +["CAManBase", "init", { + params ["_unit"]; + + if (local _unit) then { + GVAR(localUnits) pushBack _unit; + }; +}] call CBA_fnc_addClassEventHandler; + +["CAManBase", "local", { + params ["_unit", "_local"]; + + if (_local) then { + GVAR(localUnits) pushBack _unit; + } else { + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; +}] call CBA_fnc_addClassEventHandler; + ////////////////////////////////////////////////// // Set up remote execution From e15f0e62d9ec363b44552b36170e448493fffb1b Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Tue, 17 Jan 2017 19:59:31 +0100 Subject: [PATCH 02/15] Init localUnits Variable --- addons/common/XEH_preInit.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 355ffb2a7d9..60eef0de4ae 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -28,6 +28,8 @@ GVAR(statusEffect_isGlobal) = []; GVAR(setHearingCapabilityMap) = []; +GVAR(localUnits) = []; + ////////////////////////////////////////////////// // Set up PlayerChanged eventhandler for pre init (EH is installed in postInit) ////////////////////////////////////////////////// From 54ac1bd545ecb557581031d08a64a6f8de9a16ad Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Tue, 17 Jan 2017 20:03:20 +0100 Subject: [PATCH 03/15] use localUnits for medical_blood statemachine --- addons/medical_blood/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index ceff7f074ce..934520cae08 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -30,7 +30,7 @@ if (isServer) then { private _listcode = if (GVAR(enabledFor) == 1) then { {[ACE_player] select {[_x] call FUNC(isBleeding)}} // ace_player is only possible local player } else { - {allUnits select {(local _x) && {[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units + {EGVAR(common,localUnits) select {{[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units }; private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; From 5ec6f545a95d67c6501fdcabc49bf2be0cef2078 Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Tue, 17 Jan 2017 20:03:57 +0100 Subject: [PATCH 04/15] use localUnits for medical_ai statemachine --- addons/medical_ai/StateMachine.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_ai/StateMachine.hpp b/addons/medical_ai/StateMachine.hpp index 36642fbab3a..e2d1d6f588a 100644 --- a/addons/medical_ai/StateMachine.hpp +++ b/addons/medical_ai/StateMachine.hpp @@ -1,5 +1,5 @@ class GVAR(stateMachine) { - list = "allUnits select {local _x}"; + list = QEGVAR(common,localUnits); skipNull = 1; class Initial { From dd6b603d6176bdfb0f9a00944f5dbdab851cfadb Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Tue, 17 Jan 2017 20:11:52 +0100 Subject: [PATCH 05/15] Remove bracket hell --- addons/medical_blood/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index 934520cae08..d867a09b332 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -30,7 +30,7 @@ if (isServer) then { private _listcode = if (GVAR(enabledFor) == 1) then { {[ACE_player] select {[_x] call FUNC(isBleeding)}} // ace_player is only possible local player } else { - {EGVAR(common,localUnits) select {{[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units + {EGVAR(common,localUnits) select {[_x] call FUNC(isBleeding)}}; // filter all local bleeding units }; private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; From c2c1c15a3500ac953d9c0e2d9d78327f03adbd61 Mon Sep 17 00:00:00 2001 From: dedmen Date: Sat, 11 Mar 2017 17:18:15 +0100 Subject: [PATCH 06/15] Add Deleted EH --- addons/common/XEH_postInit.sqf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 57c179cce28..760e7e5386c 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -156,6 +156,14 @@ if (isServer) then { }; }] call CBA_fnc_addClassEventHandler; +["CAManBase", "deleted", { + params ["_unit"]; + + if (local _unit) then { + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; +}] call CBA_fnc_addClassEventHandler; + ////////////////////////////////////////////////// // Set up remote execution From 310f91f4f1d350047e50db79e4f1ba39a6be9151 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 1 May 2017 13:19:33 -0500 Subject: [PATCH 07/15] Run at preInit, move to seperate file --- addons/common/XEH_PREP.hpp | 1 + addons/common/XEH_postInit.sqf | 27 ---------- addons/common/XEH_preInit.sqf | 2 +- .../functions/fnc_setupLocalUnitsHandler.sqf | 49 +++++++++++++++++++ 4 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 addons/common/functions/fnc_setupLocalUnitsHandler.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index b4e5f269862..a2f09f330a7 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -146,6 +146,7 @@ PREP(setPlayerOwner); PREP(setProne); PREP(setSetting); PREP(setSettingFromConfig); +PREP(setupLocalUnitsHandler); PREP(setVariableJIP); PREP(setVariablePublic); PREP(setVolume); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index e018d2fa589..adea925980c 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -138,33 +138,6 @@ if (isServer) then { [QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler; }; -//Eventhandlers to maintain array of localUnits -["CAManBase", "init", { - params ["_unit"]; - - if (local _unit) then { - GVAR(localUnits) pushBack _unit; - }; -}] call CBA_fnc_addClassEventHandler; - -["CAManBase", "local", { - params ["_unit", "_local"]; - - if (_local) then { - GVAR(localUnits) pushBack _unit; - } else { - GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); - }; -}] call CBA_fnc_addClassEventHandler; - -["CAManBase", "deleted", { - params ["_unit"]; - - if (local _unit) then { - GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); - }; -}] call CBA_fnc_addClassEventHandler; - ////////////////////////////////////////////////// // Set up remote execution diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 60eef0de4ae..7a7987c2722 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -28,7 +28,7 @@ GVAR(statusEffect_isGlobal) = []; GVAR(setHearingCapabilityMap) = []; -GVAR(localUnits) = []; +[] call FUNC(setupLocalUnitsHandler); // Add local units event handlers (ace_common_localUnits) ////////////////////////////////////////////////// // Set up PlayerChanged eventhandler for pre init (EH is installed in postInit) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf new file mode 100644 index 00000000000..e450029c8d3 --- /dev/null +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -0,0 +1,49 @@ +/* + * Author: dedmen + * Adds the local unit event handlers. Access with array `ace_common_localUnits`. + * + * Arguments: + * Nothing + * + * Return Value: + * Nothing + * + * Example: + * [] call ace_common_fnc_setupLocalUnitsHandler + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +GVAR(localUnits) = []; + +//Eventhandlers to maintain array of localUnits +["CAManBase", "init", { + params ["_unit"]; + TRACE_2("unit init",_unit,local _unit); + + if (local _unit) then { + GVAR(localUnits) pushBack _unit; + }; +}] call CBA_fnc_addClassEventHandler; + +["CAManBase", "local", { + params ["_unit", "_local"]; + TRACE_2("unit local",_unit,_local); + + if (_local) then { + GVAR(localUnits) pushBack _unit; + } else { + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; +}] call CBA_fnc_addClassEventHandler; + +["CAManBase", "deleted", { + params ["_unit"]; + TRACE_2("unit deleted",_unit,local _unit); + + if (local _unit) then { + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; +}] call CBA_fnc_addClassEventHandler; From c0bdd8111fd21954e98a5eebea3d24cc0cae6e2c Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 8 May 2017 00:17:35 -0500 Subject: [PATCH 08/15] Handle Respawns, Filter Dead --- .../functions/fnc_setupLocalUnitsHandler.sqf | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf index e450029c8d3..a10be160d66 100644 --- a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -24,6 +24,17 @@ GVAR(localUnits) = []; TRACE_2("unit init",_unit,local _unit); if (local _unit) then { + if (!alive _unit) exitWith {}; + GVAR(localUnits) pushBack _unit; + }; +}] call CBA_fnc_addClassEventHandler; + +["CAManBase", "respawn", { + params ["_unit"]; + TRACE_2("unit respawn",_unit,local _unit); + + if (local _unit) then { + if (!alive _unit) exitWith {}; GVAR(localUnits) pushBack _unit; }; }] call CBA_fnc_addClassEventHandler; @@ -33,6 +44,7 @@ GVAR(localUnits) = []; TRACE_2("unit local",_unit,_local); if (_local) then { + if (!alive _unit) exitWith {}; GVAR(localUnits) pushBack _unit; } else { GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); @@ -47,3 +59,12 @@ GVAR(localUnits) = []; GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); }; }] call CBA_fnc_addClassEventHandler; + +["CAManBase", "killed", { + params ["_unit"]; + TRACE_2("unit killed",_unit,local _unit); + + if (local _unit) then { + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; +}] call CBA_fnc_addClassEventHandler; From 85d48984725ee9c2d8f3b540681c9b98dc644409 Mon Sep 17 00:00:00 2001 From: dedmen Date: Sat, 4 Nov 2017 15:30:28 +0100 Subject: [PATCH 09/15] Add detection for Fake deleted EH --- addons/common/functions/fnc_setupLocalUnitsHandler.sqf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf index a10be160d66..6441ffdaacc 100644 --- a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -56,7 +56,13 @@ GVAR(localUnits) = []; TRACE_2("unit deleted",_unit,local _unit); if (local _unit) then { - GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + [{ + params ["_unit"]; + TRACE_3("unit deleted nextFrame",_unit,local _unit,isNull _unit); + if (isNull _unit) then { //If it is not null then the deleted EH was Fake. + GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + }; + }, [_unit]] call CBA_fnc_execNextFrame; }; }] call CBA_fnc_addClassEventHandler; From 8af22f89ca861fd67d4dba99e65f3bf8ac97dc73 Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Mon, 20 Nov 2017 13:46:57 +0100 Subject: [PATCH 10/15] Use a getter function --- addons/common/XEH_PREP.hpp | 1 + addons/common/functions/fnc_getLocalUnits.sqf | 22 +++++++++++++++++++ addons/medical_ai/StateMachine.hpp | 2 +- addons/medical_blood/XEH_postInit.sqf | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 addons/common/functions/fnc_getLocalUnits.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 1f3457b6932..e5bad2ce833 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -58,6 +58,7 @@ PREP(getFirstObjectIntersection); PREP(getFirstTerrainIntersection); PREP(getGunner); PREP(getInPosition); +PREP(getLocalUnits); PREP(getMapData); PREP(getMapGridData); PREP(getMapGridFromPos); diff --git a/addons/common/functions/fnc_getLocalUnits.sqf b/addons/common/functions/fnc_getLocalUnits.sqf new file mode 100644 index 00000000000..5ce3da0e355 --- /dev/null +++ b/addons/common/functions/fnc_getLocalUnits.sqf @@ -0,0 +1,22 @@ ++/* + * Author: dedmen + * Gets localUnits array filtering out nullObjects. + * If you can handle null objects you can use the array array `ace_common_localUnits` directly. + * Should be equivalent to `allUnits select {local _x}` + * + * Arguments: + * Nothing + * + * Return Value: + * Array of local Units + * + * Example: + * [] call ace_common_fnc_getLocalUnits + * + * Public: Yes + */ + +//Remove null objects +GVAR(localUnits) = GVAR(localUnits) - [objNull]; + +GVAR(localUnits) \ No newline at end of file diff --git a/addons/medical_ai/StateMachine.hpp b/addons/medical_ai/StateMachine.hpp index e2d1d6f588a..130458f5633 100644 --- a/addons/medical_ai/StateMachine.hpp +++ b/addons/medical_ai/StateMachine.hpp @@ -1,5 +1,5 @@ class GVAR(stateMachine) { - list = QEGVAR(common,localUnits); + list = QUOTE(call EFUNC(common,getLocalUnits)); skipNull = 1; class Initial { diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index d867a09b332..328a7fb1889 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -30,7 +30,7 @@ if (isServer) then { private _listcode = if (GVAR(enabledFor) == 1) then { {[ACE_player] select {[_x] call FUNC(isBleeding)}} // ace_player is only possible local player } else { - {EGVAR(common,localUnits) select {[_x] call FUNC(isBleeding)}}; // filter all local bleeding units + {(call EFUNC(common,getLocalUnits)) select {[_x] call FUNC(isBleeding)}}; // filter all local bleeding units }; private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; From 5535ca1477b6dc6d89a441a9e9025eca18d36593 Mon Sep 17 00:00:00 2001 From: Dedmen Miller Date: Mon, 20 Nov 2017 13:48:18 +0100 Subject: [PATCH 11/15] delete all objNull at deletedEH --- addons/common/functions/fnc_setupLocalUnitsHandler.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf index 6441ffdaacc..c1a14e17d3e 100644 --- a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -60,7 +60,7 @@ GVAR(localUnits) = []; params ["_unit"]; TRACE_3("unit deleted nextFrame",_unit,local _unit,isNull _unit); if (isNull _unit) then { //If it is not null then the deleted EH was Fake. - GVAR(localUnits) deleteAt (GVAR(localUnits) find _unit); + GVAR(localUnits) = GVAR(localUnits) - [objNull]; }; }, [_unit]] call CBA_fnc_execNextFrame; }; From 4f9f4715b3cb47a8fb8ee3bdee367ea038a984b9 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 26 Feb 2019 13:14:24 -0600 Subject: [PATCH 12/15] Cleanup header/comments --- addons/common/functions/fnc_getLocalUnits.sqf | 11 ++++++----- .../common/functions/fnc_setupLocalUnitsHandler.sqf | 13 +++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/addons/common/functions/fnc_getLocalUnits.sqf b/addons/common/functions/fnc_getLocalUnits.sqf index 5ce3da0e355..17163d0e775 100644 --- a/addons/common/functions/fnc_getLocalUnits.sqf +++ b/addons/common/functions/fnc_getLocalUnits.sqf @@ -1,7 +1,8 @@ -+/* - * Author: dedmen +#include "script_component.hpp" +/* + * Author: dedmen * Gets localUnits array filtering out nullObjects. - * If you can handle null objects you can use the array array `ace_common_localUnits` directly. + * If you can handle null objects you can use the array `ace_common_localUnits` directly. * Should be equivalent to `allUnits select {local _x}` * * Arguments: @@ -16,7 +17,7 @@ * Public: Yes */ -//Remove null objects +// Remove null objects GVAR(localUnits) = GVAR(localUnits) - [objNull]; -GVAR(localUnits) \ No newline at end of file +GVAR(localUnits) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf index c1a14e17d3e..68da0b0459c 100644 --- a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -1,6 +1,9 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* - * Author: dedmen - * Adds the local unit event handlers. Access with array `ace_common_localUnits`. + * Author: dedmen + * Adds the local unit event handlers. + * Access with function `ace_common_fnc_getLocalUnits` or array `ace_common_localUnits` * * Arguments: * Nothing @@ -13,12 +16,10 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" GVAR(localUnits) = []; -//Eventhandlers to maintain array of localUnits +// Eventhandlers to maintain array of localUnits ["CAManBase", "init", { params ["_unit"]; TRACE_2("unit init",_unit,local _unit); @@ -59,7 +60,7 @@ GVAR(localUnits) = []; [{ params ["_unit"]; TRACE_3("unit deleted nextFrame",_unit,local _unit,isNull _unit); - if (isNull _unit) then { //If it is not null then the deleted EH was Fake. + if (isNull _unit) then { // If it is not null then the deleted EH was Fake. GVAR(localUnits) = GVAR(localUnits) - [objNull]; }; }, [_unit]] call CBA_fnc_execNextFrame; From a8b391500d77a847c10642c8d8d3da296827ec2e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 26 Feb 2019 13:40:05 -0600 Subject: [PATCH 13/15] Move isBleeding check to inside statemachine --- addons/medical_blood/XEH_postInit.sqf | 4 ++-- addons/medical_blood/functions/fnc_onBleeding.sqf | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index 328a7fb1889..34fd8407e82 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -28,9 +28,9 @@ if (isServer) then { if ((GVAR(enabledFor) == 1) && {!hasInterface}) exitWith {}; // 1: enabledFor_OnlyPlayers private _listcode = if (GVAR(enabledFor) == 1) then { - {[ACE_player] select {[_x] call FUNC(isBleeding)}} // ace_player is only possible local player + {[ACE_player]} // ace_player is only possible local player } else { - {(call EFUNC(common,getLocalUnits)) select {[_x] call FUNC(isBleeding)}}; // filter all local bleeding units + {allUnits select {(local _x) && {[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units }; private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; diff --git a/addons/medical_blood/functions/fnc_onBleeding.sqf b/addons/medical_blood/functions/fnc_onBleeding.sqf index e21f68f02fb..c800c32dc61 100644 --- a/addons/medical_blood/functions/fnc_onBleeding.sqf +++ b/addons/medical_blood/functions/fnc_onBleeding.sqf @@ -17,6 +17,7 @@ params ["_unit"]; +if (!([_unit] call FUNC(isBleeding))) exitWith {}; if (((vehicle _unit) != _unit) && {!((vehicle _unit) isKindOf "StaticWeapon")}) exitWith {}; // Don't bleed on ground if mounted private _lastTime = _unit getVariable [QGVAR(lastTime), -10]; From 4fca03c05bc5e7e7174693249d112de98053d152 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 26 Feb 2019 13:42:01 -0600 Subject: [PATCH 14/15] opps --- addons/medical_blood/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index 34fd8407e82..a26afea6271 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -30,7 +30,7 @@ if (isServer) then { private _listcode = if (GVAR(enabledFor) == 1) then { {[ACE_player]} // ace_player is only possible local player } else { - {allUnits select {(local _x) && {[_x] call FUNC(isBleeding)}}}; // filter all local bleeding units + EFUNC(common,getLocalUnits) // filter all local units }; private _stateMachine = [_listcode, true] call CBA_statemachine_fnc_create; From 04d03ae66fc0c0bff215768a68aefea97f72d58c Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 26 Feb 2019 13:45:29 -0600 Subject: [PATCH 15/15] debug off --- addons/common/functions/fnc_setupLocalUnitsHandler.sqf | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf index 68da0b0459c..5ff3aa5d05e 100644 --- a/addons/common/functions/fnc_setupLocalUnitsHandler.sqf +++ b/addons/common/functions/fnc_setupLocalUnitsHandler.sqf @@ -1,4 +1,3 @@ -#define DEBUG_MODE_FULL #include "script_component.hpp" /* * Author: dedmen