Skip to content

Commit 832571b

Browse files
authored
drop event defferal
1 parent f66ae18 commit 832571b

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

addons/medical_vitals/XEH_preInit.sqf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ PREP_RECOMPILE_END;
99
#include "initSettings.inc.sqf"
1010

1111
GVAR(oxygenSupplyConditionCache) = uiNamespace getVariable QGVAR(oxygenSupplyConditionCache);
12-
GVAR(deferredEvents) = createHashMap;
1312

1413
ADDON = true;

addons/medical_vitals/functions/fnc_consumeIVs.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private _consumedIVs = [];
4949
};
5050
} forEachReversed _ivBags;
5151

52-
(GVAR(deferredEvents) getOrDefault [hashValue _unit, [], true]) pushBack ([QEGVAR(medical,consumedIVs), [_unit, _consumedIVs]]);
52+
[QEGVAR(medical,consumedIVs), [_unit, _consumedIVs]] call CBA_fnc_localEvent;
5353

5454
if (_ivBags isEqualTo []) then {
5555
_unit setVariable [QEGVAR(medical,ivBags), nil, true];

addons/medical_vitals/functions/fnc_consumeMedications.sqf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private _consumedMedications = [];
4848
};
4949
} forEachReversed _medications;
5050

51-
(GVAR(deferredEvents) getOrDefault [hashValue _unit, [], true]) pushBack ([QEGVAR(medical,consumeMedications), [_unit, _consumedMedications]]);
51+
[QEGVAR(medical,consumeMedications), [_unit, _consumedMedications]] call CBA_fnc_localEvent;
5252

5353
if (_syncValues) then {
5454
_unit setVariable [VAR_MEDICATIONS, _medications, true]

addons/medical_vitals/functions/fnc_handleUnitVitals.sqf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ _syncValues = [_unit, _deltaT, _syncValues] call FUNC(consumeMedications);
5151

5252
END_COUNTER(Vitals);
5353

54-
//placed outside the counter as 3rd-party code may be called from these events
55-
{
56-
_x call CBA_fnc_localEvent;
57-
} forEach (GVAR(deferredEvents) getOrDefault [hashValue _unit, []]);
5854

59-
GVAR(deferredEvents) deleteAt hashValue _unit;
6055

6156
[QEGVAR(medical,handleUnitVitals), [_unit, _deltaT]] call CBA_fnc_localEvent;
6257

0 commit comments

Comments
 (0)