Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hypotherma/Vitals - Adjust Temperature Calculations #714

Open
wants to merge 4 commits into
base: dev-Tomcat
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion addons/hypothermia/functions/fnc_checkTemperature.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ switch (true) do {
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); };
default {[LLSTRING(temperature_warm), 1.5, _medic] call ACEFUNC(common,displayTextStructured); };
case (_unitTemperature < 38) : { [LLSTRING(temperature_warm), 1.5, _medic] call ACEFUNC(common,displayTextStructured); };
default {[LLSTRING(temperature_hot), 1.5, _medic] call ACEFUNC(common,displayTextStructured); };
};
3 changes: 3 additions & 0 deletions addons/hypothermia/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@
<French>Le patient ressent de la chaleur</French>
<Chinesesimp>患者感觉温暖</Chinesesimp>
</Key>
<Key ID="STR_KAT_Hypothermia_temperature_hot">
<English>Patient feels hot</English>
</Key>
<Key ID="STR_KAT_Hypothermia_Check_Temperature">
<English>Check Temperature</English>
<Dutch>Check temperatuur</Dutch>
Expand Down
6 changes: 4 additions & 2 deletions addons/vitals/functions/fnc_handleTemperatureFunction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ _positionTemperature params ["_lattitude", "_projectedTemperature"];
private _mapTemperature = _projectedTemperature - ((linearConversion [0, 90, _lattitude, 15, 5, true]) * (linearConversion [0, 1, sunOrMoon, 1, 0, true]));

private _warmingImpact = (_unit getVariable [QEGVAR(hypothermia,warmingImpact), 0]) / ML_TO_LITERS;
private _pointTemperature = -3.5 * (0.95 ^ _mapTemperature + _altitudeAdjustment);
private _currentTemperature = DEFAULT_TEMPERATURE min (((-0.3392 * (_bloodVolume^2)) + (6.00357 * _bloodVolume) + (13.3 + _warmingImpact - (_pointTemperature / 20))));
private _pointTemperature = linearConversion [0, 40, (-3.5 * (0.95 ^ _mapTemperature + _altitudeAdjustment)), 12, -9, true];
private _initialBodyTemperature = DEFAULT_TEMPERATURE min (((-0.3392 * (_bloodVolume^2)) + (6.00357 * _bloodVolume) + 13.3));

private _currentTemperature = _initialBodyTemperature + _warmingImpact - (_pointTemperature / _bloodVolume);

_unit setVariable [QEGVAR(hypothermia,unitTemperature), _currentTemperature, _syncValue];

Expand Down
Loading