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
17 changes: 17 additions & 0 deletions addons/hypothermia/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion addons/hypothermia/functions/fnc_checkTemperature.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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); };
Expand Down
Loading