From 610497373e4604148b14028ecd79ba61c801aca1 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 25 Aug 2025 23:04:07 -0700 Subject: [PATCH 1/2] Initial --- .../functions/fnc_gui_updateInjuryListPart.sqf | 6 +----- addons/vitals/XEH_postInit.sqf | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf index f17cf75a2..99c20b161 100644 --- a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf @@ -22,11 +22,7 @@ params ["_ctrl", "_target", "_selectionN", "_entries"]; if (GVAR(showCyanosis) && _selectionN in [0,2,3]) then { private _spO2 = 0; - - if (alive _target) then { - _spO2 = GET_KAT_SPO2(_target); - }; - + _spO2 = GET_KAT_SPO2(_target); if (_spO2 <= GVAR(slightValue) || HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)) then { private _cyanosisArr = switch (true) do { case (HAS_TOURNIQUET_APPLIED_ON(_target,_selectionN)); diff --git a/addons/vitals/XEH_postInit.sqf b/addons/vitals/XEH_postInit.sqf index d215eafd4..8959ee702 100644 --- a/addons/vitals/XEH_postInit.sqf +++ b/addons/vitals/XEH_postInit.sqf @@ -4,3 +4,21 @@ [QEGVAR(misc,handleRespawn), LINKFUNC(handleRespawn)] call CBA_fnc_addEventHandler; [QACEGVAR(medical_treatment,fullHealLocalMod), LINKFUNC(fullHealLocal)] call CBA_fnc_addEventHandler; +["ace_medical_death", { + params ["_unit"]; + [{ + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _alive = alive _unit; + if (_alive) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _bg = _unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]; + private _spo2 = (_bg select 2) - 0.005; + if (_spo2 < 0.01) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _bg set [2, _spo2]; + _unit setVariable [VAR_BLOOD_GAS, _bg, true]; +}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; \ No newline at end of file From deaa886a893405fdcdce25ad5758ce40354d5ce2 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Sat, 16 May 2026 13:07:15 -0700 Subject: [PATCH 2/2] Update XEH_postInit.sqf --- addons/vitals/XEH_postInit.sqf | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/addons/vitals/XEH_postInit.sqf b/addons/vitals/XEH_postInit.sqf index 8959ee702..11d9f3f74 100644 --- a/addons/vitals/XEH_postInit.sqf +++ b/addons/vitals/XEH_postInit.sqf @@ -7,18 +7,18 @@ ["ace_medical_death", { params ["_unit"]; [{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; - private _alive = alive _unit; - if (_alive) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - private _bg = _unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]; - private _spo2 = (_bg select 2) - 0.005; - if (_spo2 < 0.01) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - _bg set [2, _spo2]; - _unit setVariable [VAR_BLOOD_GAS, _bg, true]; -}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; + params ["_args", "_idPFH"]; + _args params ["_unit"]; + private _alive = alive _unit; + if (_alive) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _bg = _unit getVariable [VAR_BLOOD_GAS, DEFAULT_BLOOD_GAS]; + private _spo2 = (_bg select 2) - 0.005; + if (_spo2 < 0.01) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + _bg set [2, _spo2]; + _unit setVariable [VAR_BLOOD_GAS, _bg, true]; + }, 10, [_unit]] call CBA_fnc_addPerFrameHandler; }] call CBA_fnc_addEventHandler; \ No newline at end of file