diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index aa77fc8111..cda1bb3419 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -19,7 +19,7 @@ GVAR(altitude) = -1000 max parseNumber(ctrlText 130030) min 20000; GVAR(temperature) = -50 max parseNumber(ctrlText 130040) min 160; GVAR(barometricPressure) = 0 max parseNumber(ctrlText 130050) min 1350; GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 130060) min 100) / 100; -if (GVAR(currentUnit) == 1) then { +if (GVAR(currentUnit) != 2) then { GVAR(altitude) = GVAR(altitude) * 0.3048; GVAR(temperature) = (GVAR(temperature) - 32) / 1.8; GVAR(barometricPressure) = GVAR(barometricPressure) * 33.86389; diff --git a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf index 8dcbc89280..7cd34754da 100644 --- a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf @@ -17,18 +17,18 @@ ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007); -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)]; } else { ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [130050, Str(Round(GVAR(barometricPressure)))]; } else { ctrlSetText [130050, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; ctrlSetText [130060, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [130030, Str(Round(GVAR(altitude)))]; } else { ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))]; diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf index fa555f50e7..be7565bda7 100644 --- a/addons/atragmx/functions/fnc_update_atmosphere.sqf +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -15,18 +15,18 @@ */ #include "script_component.hpp" -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)]; } else { ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)]; }; -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [210, Str(Round(GVAR(barometricPressure)))]; } else { ctrlSetText [210, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)]; }; ctrlSetText [220, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)]; -if (GVAR(currentUnit) != 1) then { +if (GVAR(currentUnit) == 2) then { ctrlSetText [230, Str(Round(GVAR(altitude)))]; } else { ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))];