diff --git a/addons/hypothermia/XEH_postInit.sqf b/addons/hypothermia/XEH_postInit.sqf index e97ddf5bd..dddc44f25 100644 --- a/addons/hypothermia/XEH_postInit.sqf +++ b/addons/hypothermia/XEH_postInit.sqf @@ -6,3 +6,20 @@ [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 _temp = _unit getVariable [QGVAR(unitTemperature), 37]; + if (_temp < 22) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + private _temp = _temp - 0.1; + _unit setVariable [QGVAR(unitTemperature), _temp, true]; +}, 10, [_unit]] call CBA_fnc_addPerFrameHandler; +}] call CBA_fnc_addEventHandler; \ No newline at end of file diff --git a/addons/hypothermia/functions/fnc_checkTemperature.sqf b/addons/hypothermia/functions/fnc_checkTemperature.sqf index 69eec76b6..9189ad9a9 100644 --- a/addons/hypothermia/functions/fnc_checkTemperature.sqf +++ b/addons/hypothermia/functions/fnc_checkTemperature.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient"]; private _unitTemperature = _patient getVariable [QGVAR(unitTemperature), 37]; switch (true) do { - case (!(alive _patient)) : { [LLSTRING(temperature_dead), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; + case (_unitTemperature < 24) : { [LLSTRING(temperature_dead), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 29) : { [LLSTRING(temperature_cold), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 32) : { [LLSTRING(temperature_cool), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; case (_unitTemperature < 36) : { [LLSTRING(temperature_mild), 1.5, _medic] call ACEFUNC(common,displayTextStructured); };