Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
18 changes: 18 additions & 0 deletions addons/vitals/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Loading