mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed duplicate Kestrel4500_ prefix
This commit is contained in:
parent
9f2a862489
commit
f974e7a9a1
@ -14,7 +14,7 @@ class CfgVehicles {
|
||||
};
|
||||
class GVAR(show) {
|
||||
displayName = "$STR_ACE_Kestrel4500_ShowKestrel";
|
||||
condition = QUOTE(call FUNC(canShow) && !GVAR(Kestrel4500_Overlay));
|
||||
condition = QUOTE(call FUNC(canShow) && !GVAR(Overlay));
|
||||
statement = QUOTE(call FUNC(displayKestrel));
|
||||
showDisabled = 0;
|
||||
priority = 0.2;
|
||||
@ -23,7 +23,7 @@ class CfgVehicles {
|
||||
};
|
||||
class GVAR(hide) {
|
||||
displayName = "$STR_ACE_Kestrel4500_HideKestrel";
|
||||
condition = QUOTE(GVAR(Kestrel4500_Overlay));
|
||||
condition = QUOTE(GVAR(Overlay));
|
||||
statement = QUOTE(call FUNC(displayKestrel));
|
||||
showDisabled = 0;
|
||||
priority = 0.3;
|
||||
|
@ -2,20 +2,19 @@
|
||||
|
||||
//#include "initKeybinds.sqf"
|
||||
|
||||
GVAR(Kestrel4500_Menus) = ["Direction", "Wind SPD m/s", "CROSSWIND m/s", "HEADWIND m/s", "TEMP °C", "HUMIDITY %", "BARO hPA", "ALTITUDE m", "User Screen 1", "User Screen 2"];
|
||||
GVAR(Menus) = ["Direction", "Wind SPD m/s", "CROSSWIND m/s", "HEADWIND m/s", "TEMP °C", "HUMIDITY %", "BARO hPA", "ALTITUDE m", "User Screen 1", "User Screen 2"];
|
||||
|
||||
GVAR(Kestrel4500_TOTAL) = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
GVAR(Kestrel4500_ENTRIES) = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
GVAR(TOTAL) = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
GVAR(ENTRIES) = [0, 0, 0, 0, 0, 0, 0, 0];
|
||||
|
||||
GVAR(Kestrel4500_MinAvgMax) = false;
|
||||
GVAR(Kestrel4500_MinAvgMaxMode) = 0;
|
||||
GVAR(MinAvgMax) = false;
|
||||
GVAR(MinAvgMaxMode) = 0;
|
||||
|
||||
GVAR(Kestrel4500_Menu) = 1;
|
||||
GVAR(Kestrel4500_Directions) = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"];
|
||||
GVAR(Kestrel4500_Direction) = 0;
|
||||
GVAR(Menu) = 1;
|
||||
GVAR(Directions) = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"];
|
||||
GVAR(Direction) = 0;
|
||||
|
||||
GVAR(Kestrel4500_RefHeading) = 0;
|
||||
GVAR(RefHeading) = 0;
|
||||
|
||||
GVAR(Kestrel4500) = false;
|
||||
GVAR(Kestrel4500_Overlay) = false;
|
||||
GVAR(Kestrel4500_OverlayStart) = diag_tickTime;
|
||||
GVAR(Overlay) = false;
|
||||
|
@ -17,32 +17,32 @@
|
||||
|
||||
switch (_this) do {
|
||||
case 0: { // Enter
|
||||
if (!GVAR(Kestrel4500_MinAvgMAx) && (GVAR(Kestrel4500_Menu) == 2 || GVAR(Kestrel4500_Menu) == 3)) then {
|
||||
GVAR(Kestrel4500_RefHeading) = getDir ACE_player;
|
||||
if (!GVAR(MinAvgMAx) && (GVAR(Menu) == 2 || GVAR(Menu) == 3)) then {
|
||||
GVAR(RefHeading) = getDir ACE_player;
|
||||
};
|
||||
if (GVAR(Kestrel4500_MinAvgMAx) && GVAR(Kestrel4500_Menu) > 0 && GVAR(Kestrel4500_Menu) < 4) then {
|
||||
if (GVAR(Kestrel4500_MinAvgMAxMode) != 1) then {
|
||||
if (GVAR(MinAvgMAx) && GVAR(Menu) > 0 && GVAR(Menu) < 4) then {
|
||||
if (GVAR(MinAvgMAxMode) != 1) then {
|
||||
{
|
||||
GVAR(Kestrel4500_MIN) set [_x, 0];
|
||||
GVAR(Kestrel4500_MAX) set [_x, 0];
|
||||
GVAR(Kestrel4500_TOTAL) set [_x, 0];
|
||||
GVAR(Kestrel4500_ENTRIES) set [_x, 0];
|
||||
GVAR(MIN) set [_x, 0];
|
||||
GVAR(MAX) set [_x, 0];
|
||||
GVAR(TOTAL) set [_x, 0];
|
||||
GVAR(ENTRIES) set [_x, 0];
|
||||
} forEach [1, 2, 3];
|
||||
};
|
||||
GVAR(Kestrel4500_MinAvgMaxMode) = GVAR(Kestrel4500_MinAvgMaxMode + 1) % 3;
|
||||
GVAR(MinAvgMaxMode) = GVAR(MinAvgMaxMode + 1) % 3;
|
||||
};
|
||||
};
|
||||
case 1: { // Top
|
||||
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) - 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
|
||||
GVAR(Menu) = (GVAR(Menu) - 1 + (count GVAR(Menus))) % (count GVAR(Menus));
|
||||
};
|
||||
case 2: { // Bottom
|
||||
GVAR(Kestrel4500_Menu) = (GVAR(Kestrel4500_Menu) + 1 + (count GVAR(Kestrel4500_Menus))) % (count GVAR(Kestrel4500_Menus));
|
||||
GVAR(Menu) = (GVAR(Menu) + 1 + (count GVAR(Menus))) % (count GVAR(Menus));
|
||||
};
|
||||
case 3: { // Left
|
||||
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
|
||||
GVAR(MinAvgMaxMode) = !GVAR(MinAvgMaxMode);
|
||||
};
|
||||
case 4: { // Right
|
||||
GVAR(Kestrel4500_MinAvgMaxMode) = !GVAR(Kestrel4500_MinAvgMaxMode);
|
||||
GVAR(MinAvgMaxMode) = !GVAR(MinAvgMaxMode);
|
||||
};
|
||||
case 5: { // Memory
|
||||
};
|
||||
|
@ -15,8 +15,4 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_returnValue"];
|
||||
|
||||
_returnValue = ("ACE_Kestrel4500" in (items ACE_player)) && {!(underwater ACE_player)};
|
||||
|
||||
_returnValue
|
||||
("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player))
|
||||
|
@ -19,28 +19,28 @@ private ["_playerDir", "_windSpeed", "_windDir", "_crosswind", "_headwind", "_hu
|
||||
|
||||
if (isNil QUOTE(EGVAR(advanced_ballistics,Altitude))) then {EGVAR(advanced_ballistics,Altitude) = 0};
|
||||
|
||||
if (isNil QUOTE(GVAR(Kestrel4500_MIN)) || isNil QUOTE(GVAR(Kestrel4500_MAX))) then {
|
||||
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);
|
||||
GVAR(Kestrel4500_MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
|
||||
GVAR(Kestrel4500_MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
|
||||
GVAR(MIN) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
|
||||
GVAR(MAX) = [0, 0, 0, 0, _temperature, _humidity, _barometricPressure, _altitude];
|
||||
};
|
||||
|
||||
{
|
||||
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
|
||||
GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1];
|
||||
} forEach [0, 4, 5, 6 ,7];
|
||||
|
||||
// Direction
|
||||
_playerDir = getDir ACE_player;
|
||||
GVAR(Kestrel4500_MIN) set [0, (GVAR(Kestrel4500_MIN) select 0) min _playerDir];
|
||||
GVAR(Kestrel4500_MAX) set [0, _playerDir max (GVAR(Kestrel4500_MAX) select 0)];
|
||||
GVAR(Kestrel4500_TOTAL) set [0, (GVAR(Kestrel4500_TOTAL) select 0) + _playerDir];
|
||||
GVAR(MIN) set [0, (GVAR(MIN) select 0) min _playerDir];
|
||||
GVAR(MAX) set [0, _playerDir max (GVAR(MAX) select 0)];
|
||||
GVAR(TOTAL) set [0, (GVAR(TOTAL) select 0) + _playerDir];
|
||||
|
||||
if (GVAR(Kestrel4500_MinAvgMaxMode) == 1) then {
|
||||
if (GVAR(MinAvgMaxMode) == 1) then {
|
||||
{
|
||||
GVAR(Kestrel4500_ENTRIES) set [_x, (GVAR(Kestrel4500_ENTRIES) select _x) + 1];
|
||||
GVAR(ENTRIES) set [_x, (GVAR(ENTRIES) select _x) + 1];
|
||||
} forEach [1, 2, 3];
|
||||
|
||||
// Wind SPD
|
||||
@ -52,43 +52,43 @@ if (GVAR(Kestrel4500_MinAvgMaxMode) == 1) then {
|
||||
};
|
||||
|
||||
_windSpeed = cos(_playerDir - _windDir) * _windSpeed;
|
||||
GVAR(Kestrel4500_MIN) set [1, (GVAR(Kestrel4500_MIN) select 1) min abs(_windSpeed)];
|
||||
GVAR(Kestrel4500_MAX) set [1, abs(_windSpeed) max (GVAR(Kestrel4500_MAX) select 1)];
|
||||
GVAR(Kestrel4500_TOTAL) set [1, (GVAR(Kestrel4500_TOTAL) select 1) + abs(_windSpeed)];
|
||||
GVAR(MIN) set [1, (GVAR(MIN) select 1) min abs(_windSpeed)];
|
||||
GVAR(MAX) set [1, abs(_windSpeed) max (GVAR(MAX) select 1)];
|
||||
GVAR(TOTAL) set [1, (GVAR(TOTAL) select 1) + abs(_windSpeed)];
|
||||
|
||||
// CROSSWIND
|
||||
_crosswind = abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
|
||||
GVAR(Kestrel4500_MIN) set [2, (GVAR(Kestrel4500_MIN) select 2) min _crosswind];
|
||||
GVAR(Kestrel4500_MAX) set [2, _crosswind max (GVAR(Kestrel4500_MAX) select 2)];
|
||||
GVAR(Kestrel4500_TOTAL) set [2, (GVAR(Kestrel4500_TOTAL) select 2) + _crosswind];
|
||||
_crosswind = abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed);
|
||||
GVAR(MIN) set [2, (GVAR(MIN) select 2) min _crosswind];
|
||||
GVAR(MAX) set [2, _crosswind max (GVAR(MAX) select 2)];
|
||||
GVAR(TOTAL) set [2, (GVAR(TOTAL) select 2) + _crosswind];
|
||||
|
||||
// HEADWIND
|
||||
_headwind = abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed);
|
||||
GVAR(Kestrel4500_MIN) set [3, (GVAR(Kestrel4500_MIN) select 3) min _headwind];
|
||||
GVAR(Kestrel4500_MAX) set [3, _headwind max (GVAR(Kestrel4500_MAX) select 3)];
|
||||
GVAR(Kestrel4500_TOTAL) set [3, (GVAR(Kestrel4500_TOTAL) select 3) + _headwind];
|
||||
_headwind = abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed);
|
||||
GVAR(MIN) set [3, (GVAR(MIN) select 3) min _headwind];
|
||||
GVAR(MAX) set [3, _headwind max (GVAR(MAX) select 3)];
|
||||
GVAR(TOTAL) set [3, (GVAR(TOTAL) select 3) + _headwind];
|
||||
};
|
||||
|
||||
// TEMP
|
||||
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL ACE_player) select 2);
|
||||
GVAR(Kestrel4500_MIN) set [4, (GVAR(Kestrel4500_MIN) select 4) min _temperature];
|
||||
GVAR(Kestrel4500_MAX) set [4, _temperature max (GVAR(Kestrel4500_MAX) select 4)];
|
||||
GVAR(Kestrel4500_TOTAL) set [4, (GVAR(Kestrel4500_TOTAL) select 4) + _temperature];
|
||||
GVAR(MIN) set [4, (GVAR(MIN) select 4) min _temperature];
|
||||
GVAR(MAX) set [4, _temperature max (GVAR(MAX) select 4)];
|
||||
GVAR(TOTAL) set [4, (GVAR(TOTAL) select 4) + _temperature];
|
||||
|
||||
// HUMIDITY
|
||||
_humidity = EGVAR(weather,currentHumidity);
|
||||
GVAR(Kestrel4500_MIN) set [5, (GVAR(Kestrel4500_MIN) select 5) min _humidity];
|
||||
GVAR(Kestrel4500_MAX) set [5, _humidity max (GVAR(Kestrel4500_MAX) select 5)];
|
||||
GVAR(Kestrel4500_TOTAL) set [5, (GVAR(Kestrel4500_TOTAL) select 5) + _humidity];
|
||||
GVAR(MIN) set [5, (GVAR(MIN) select 5) min _humidity];
|
||||
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;
|
||||
GVAR(Kestrel4500_MIN) set [6, (GVAR(Kestrel4500_MIN) select 6) min _barometricPressure];
|
||||
GVAR(Kestrel4500_MAX) set [6, _barometricPressure max (GVAR(Kestrel4500_MAX) select 6)];
|
||||
GVAR(Kestrel4500_TOTAL) set [6, (GVAR(Kestrel4500_TOTAL) select 6) + _barometricPressure];
|
||||
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);
|
||||
GVAR(Kestrel4500_MIN) set [7, (GVAR(Kestrel4500_MIN) select 7) min _altitude];
|
||||
GVAR(Kestrel4500_MAX) set [7, _altitude max (GVAR(Kestrel4500_MAX) select 7)];
|
||||
GVAR(Kestrel4500_TOTAL) set [7, (GVAR(Kestrel4500_TOTAL) select 7) + _altitude];
|
||||
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];
|
@ -18,7 +18,7 @@ if (dialog) exitWith { false };
|
||||
if (underwater ACE_player) exitWith { false };
|
||||
if (!("ACE_Kestrel4500" in (uniformItems ACE_player)) && !("ACE_Kestrel4500" in (vestItems ACE_player))) exitWith { false };
|
||||
|
||||
GVAR(Kestrel4500_Overlay) = false;
|
||||
GVAR(Overlay) = false;
|
||||
3 cutText ["", "PLAIN"];
|
||||
|
||||
GVAR(Kestrel4500) = true;
|
||||
|
@ -29,8 +29,8 @@
|
||||
|
||||
private ["_outputData"];
|
||||
|
||||
if (GVAR(Kestrel4500_Overlay)) exitWith {
|
||||
GVAR(Kestrel4500_Overlay) = false;
|
||||
if (GVAR(Overlay)) exitWith {
|
||||
GVAR(Overlay) = false;
|
||||
3 cutText ["", "PLAIN"];
|
||||
true
|
||||
};
|
||||
@ -42,12 +42,12 @@ if (GVAR(Kestrel4500) && dialog) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
GVAR(Kestrel4500_Overlay) = true;
|
||||
GVAR(Overlay) = true;
|
||||
|
||||
[{
|
||||
// abort condition
|
||||
if (!GVAR(Kestrel4500_Overlay) || {!(("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)))}) exitWith {
|
||||
GVAR(Kestrel4500_Overlay) = false;
|
||||
if (!GVAR(Overlay) || {!(("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)))}) exitWith {
|
||||
GVAR(Overlay) = false;
|
||||
3 cutText ["", "PLAIN"];
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ if (isNil QUOTE(EGVAR(advanced_ballistics,Altitude))) then {EGVAR(advanced_balli
|
||||
|
||||
[] call FUNC(collectData);
|
||||
|
||||
_textTop = GVAR(Kestrel4500_Menus) select GVAR(Kestrel4500_Menu);
|
||||
_textTop = GVAR(Menus) select GVAR(Menu);
|
||||
_textCenterBig = "";
|
||||
|
||||
_textCenterLine1Left = "";
|
||||
@ -47,17 +47,17 @@ if (isClass (configFile >> "CfgPatches" >> "ACE_Advanced_Ballistics")) then {
|
||||
_playerDir = getDir ACE_player;
|
||||
_windSpeed = cos(_playerDir - _windDir) * _windSpeed;
|
||||
|
||||
GVAR(Kestrel4500_Direction) = 4 * floor(_playerDir / 90);
|
||||
if (_playerDir % 90 > 10) then { GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) + 1};
|
||||
if (_playerDir % 90 > 35) then { GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) + 1};
|
||||
if (_playerDir % 90 > 55) then { GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) + 1};
|
||||
if (_playerDir % 90 > 80) then { GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) + 1};
|
||||
GVAR(Kestrel4500_Direction) = GVAR(Kestrel4500_Direction) % 16;
|
||||
GVAR(Direction) = 4 * floor(_playerDir / 90);
|
||||
if (_playerDir % 90 > 10) then { GVAR(Direction) = GVAR(Direction) + 1};
|
||||
if (_playerDir % 90 > 35) then { GVAR(Direction) = GVAR(Direction) + 1};
|
||||
if (_playerDir % 90 > 55) then { GVAR(Direction) = GVAR(Direction) + 1};
|
||||
if (_playerDir % 90 > 80) then { GVAR(Direction) = GVAR(Direction) + 1};
|
||||
GVAR(Direction) = GVAR(Direction) % 16;
|
||||
|
||||
switch (GVAR(Kestrel4500_Menu)) do {
|
||||
switch (GVAR(Menu)) do {
|
||||
case 0: { // Direction
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
_textCenterBig = format["%1", format["%1 %2", GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction), round(_playerDir)]];
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = format["%1", format["%1 %2", GVAR(Direction)s select GVAR(Direction), round(_playerDir)]];
|
||||
} else {
|
||||
_textCenterLine1Left = "Min";
|
||||
_textCenterLine2Left = "Avg";
|
||||
@ -68,12 +68,12 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 1: { // Wind SPD
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(abs(_windSpeed) * 10) / 10);
|
||||
} else {
|
||||
_textCenterLine1Left = "Max";
|
||||
_textCenterLine2Left = "Avg";
|
||||
switch (GVAR(Kestrel4500_MinAvgMaxMode)) do {
|
||||
switch (GVAR(MinAvgMaxMode)) do {
|
||||
case 0: {
|
||||
_textCenterLine1Right = "--. -";
|
||||
_textCenterLine2Right = "--. -";
|
||||
@ -93,14 +93,14 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 2: { // CROSSWIND
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(abs(sin(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
|
||||
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
|
||||
_textInfoLine2 = "- set heading";
|
||||
} else {
|
||||
_textCenterLine1Left = "Max";
|
||||
_textCenterLine2Left = "Avg";
|
||||
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
|
||||
switch (GVAR(MinAvgMax)Mode) do {
|
||||
case 0: {
|
||||
_textCenterLine1Right = "--. -";
|
||||
_textCenterLine2Right = "--. -";
|
||||
@ -120,14 +120,14 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 3: { // HEADWIND
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(abs(cos(GVAR(Kestrel4500_RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
|
||||
_textInfoLine1 = format["%1 m/s @ %2", round((cos(_playerDir - _windDir) * _windSpeed) * 10) / 10, round(_playerDir)];
|
||||
_textInfoLine2 = "- set heading";
|
||||
} else {
|
||||
_textCenterLine1Left = "Max";
|
||||
_textCenterLine2Left = "Avg";
|
||||
switch (GVAR(Kestrel4500_MinAvgMax)Mode) do {
|
||||
switch (GVAR(MinAvgMax)Mode) do {
|
||||
case 0: {
|
||||
_textCenterLine1Right = "--. -";
|
||||
_textCenterLine2Right = "--. -";
|
||||
@ -147,7 +147,7 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 4: { // TEMP
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(_temperature * 10) / 10);
|
||||
} else {
|
||||
_textCenterLine1Left = "Min";
|
||||
@ -159,7 +159,7 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 5: { // HUMIDITY
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(_humidity * 100 * 10) / 10);
|
||||
} else {
|
||||
_textCenterLine1Left = "Min";
|
||||
@ -171,7 +171,7 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 6: { // BARO
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round((1013.25 * exp(-(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)) / 7990) - 10 * overcast) * 10) / 10);
|
||||
} else {
|
||||
_textCenterLine1Left = "Min";
|
||||
@ -183,7 +183,7 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
};
|
||||
};
|
||||
case 7: { // ALTITUDE
|
||||
if (!GVAR(Kestrel4500_MinAvgMax)) then {
|
||||
if (!GVAR(MinAvgMax)) then {
|
||||
_textCenterBig = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
|
||||
} else {
|
||||
_textCenterLine1Left = "Min";
|
||||
@ -198,7 +198,7 @@ switch (GVAR(Kestrel4500_Menu)) do {
|
||||
_textCenterLine1Left = Str(round(_playerDir));
|
||||
_textCenterLine2Left = Str(round(EGVAR(advanced_ballistics,Altitude) + ((getPosASL ACE_player) select 2)));
|
||||
_textCenterLine3Left = Str(round(abs(_windSpeed) * 10) / 10);
|
||||
_textCenterLine1Right = GVAR(Kestrel4500_Direction)s select GVAR(Kestrel4500_Direction);
|
||||
_textCenterLine1Right = GVAR(Direction)s select GVAR(Direction);
|
||||
_textCenterLine2Right = "m";
|
||||
_textCenterLine3Right = "m/s";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user