mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Proper Min/Max storing of negative tailwind values.
This commit is contained in:
parent
db7c2a19e6
commit
1816208997
@ -65,11 +65,17 @@ if (GVAR(MinAvgMaxMode) == 1) then {
|
|||||||
// HEADWIND
|
// HEADWIND
|
||||||
_headwind = 0;
|
_headwind = 0;
|
||||||
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
|
||||||
_headwind = abs(cos(GVAR(RefHeading) - _playerDir) * _windSpeed);
|
_headwind = cos(GVAR(RefHeading) - _playerDir) * _windSpeed;
|
||||||
} else {
|
} 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;
|
[5, _temperature] call _fnc_updateMemory;
|
||||||
|
Loading…
Reference in New Issue
Block a user