From 823d834457521289e858b05525ca474630dea266 Mon Sep 17 00:00:00 2001 From: ulteq Date: Wed, 8 Apr 2015 12:56:34 +0200 Subject: [PATCH] Replaced EGVAR(advanced_ballistics,Altitude) with EGVAR(weather,Altitude) --- addons/kestrel4500/functions/fnc_collectData.sqf | 10 ++++------ .../kestrel4500/functions/fnc_generateOutputData.sqf | 10 +++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index ad05a57d0f..61b0cdb348 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -17,13 +17,11 @@ private ["_playerDir", "_windSpeed", "_windDir", "_crosswind", "_headwind", "_humidity", "_temperature", "_humidity", "_barometricPressure", "_altitude"]; -if (isNil QUOTE(EGVAR(advanced_ballistics,Altitude))) then {EGVAR(advanced_ballistics,Altitude) = 0}; - if (isNil QUOTE(GVAR(MIN)) || isNil QUOTE(GVAR(MAX))) then { _temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2); _humidity = EGVAR(weather,currentHumidity); - _barometricPressure = 1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; - _altitude = EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2); + _barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; + _altitude = EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2); GVAR(MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude]; GVAR(MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude]; }; @@ -82,13 +80,13 @@ GVAR(MAX) set [5, _humidity max (GVAR(MAX) select 5)]; GVAR(TOTAL) set [5, (GVAR(TOTAL) select 5) + _humidity]; // BARO -_barometricPressure = 1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; +_barometricPressure = 1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast; GVAR(MIN) set [6, (GVAR(MIN) select 6) min _barometricPressure]; GVAR(MAX) set [6, _barometricPressure max (GVAR(MAX) select 6)]; GVAR(TOTAL) set [6, (GVAR(TOTAL) select 6) + _barometricPressure]; // ALTITUDE -_altitude = EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2); +_altitude = EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2); GVAR(MIN) set [7, (GVAR(MIN) select 7) min _altitude]; GVAR(MAX) set [7, _altitude max (GVAR(MAX) select 7)]; GVAR(TOTAL) set [7, (GVAR(TOTAL) select 7) + _altitude]; \ No newline at end of file diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 141a3be18a..67bd567dae 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -17,7 +17,7 @@ private ["_playerDir", "_textTop", "_textCenterBig", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_temperature", "_humidity", "_windSpeed", "_windDir", "_newWindSpeed", "_windSource", "_height"]; -if (isNil QUOTE(EGVAR(advanced_ballistics,Altitude))) then {EGVAR(advanced_ballistics,Altitude) = 0}; +if (isNil QUOTE(EGVAR(weather,Altitude))) then {EGVAR(weather,Altitude) = 0}; [] call FUNC(collectData); @@ -172,7 +172,7 @@ switch (GVAR(Menu)) do { }; case 6: { // BARO if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); + _textCenterBig = Str(round((1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; @@ -184,7 +184,7 @@ switch (GVAR(Menu)) do { }; case 7: { // ALTITUDE if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2))); + _textCenterBig = Str(round(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2))); } else { _textCenterLine1Left = "Min"; _textCenterLine2Left = "Avg"; @@ -196,7 +196,7 @@ switch (GVAR(Menu)) do { }; case 8: { // User Screen 1 _textCenterLine1Left = Str(round(_playerDir)); - _textCenterLine2Left = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2))); + _textCenterLine2Left = Str(round(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2))); _textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10); _textCenterLine1Right = GVAR(Direction)s select GVAR(Direction); _textCenterLine2Right = "m"; @@ -205,7 +205,7 @@ switch (GVAR(Menu)) do { case 9: { // User Screen 2 _textCenterLine1Left = Str(round(_temperature * 10) / 10); _textCenterLine2Left = Str(round(_humidity * 100 * 10) / 10); - _textCenterLine3Left = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); + _textCenterLine3Left = Str(round((1013.25 * exp(-(EGVAR(weather,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10); _textCenterLine1Right = "C"; _textCenterLine2Right = "%"; _textCenterLine3Right = "hPA";