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

Tailwinds are displayed as negative values. #1333

Merged
merged 2 commits into from
May 21, 2015
Merged
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
12 changes: 9 additions & 3 deletions addons/kestrel4500/functions/fnc_collectData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ if (GVAR(MinAvgMaxMode) == 1) then {
// HEADWIND
_headwind = 0;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_headwind = abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed);
_headwind = cos(GVAR(RefHeading) - _playerDir) * _windSpeed;
} else {
_headwind = abs(cos(GVAR(RefHeading)) * _windSpeed);
_headwind = cos(GVAR(RefHeading)) * _windSpeed;
};
[4, _headwind] call _fnc_updateMemory;
if (abs(_headwind) > abs(GVAR(MAX) select 4)) then {
GVAR(MAX) set [4, _headwind];
};
if (abs(_headwind) < abs(GVAR(MIN) select 4)) then {
GVAR(MIN) set [4, _headwind];
};
GVAR(TOTAL) set [4, (GVAR(TOTAL) select 4) + _headwind];
};

[5, _temperature] call _fnc_updateMemory;
Expand Down
4 changes: 2 additions & 2 deletions addons/kestrel4500/functions/fnc_generateOutputData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ if (GVAR(referenceHeadingMenu) == 0) then {
case 4: { // HEADWIND
if (!GVAR(MinAvgMax)) then {
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_textCenterBig = Str(round(abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round((abs(cos(_playerDir - _windDir)) * _windSpeed) * 10) / 10, round(_playerDir)];
} else {
_textCenterBig = Str(round(abs(cos(GVAR(RefHeading)) * _windSpeed) * 10) / 10);
_textCenterBig = Str(round(cos(GVAR(RefHeading)) * _windSpeed * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)];
};
_textInfoLine2 = "- set heading";
Expand Down