Fix inverting wind direction each sync update

Fix #1052 (and maybe #1708)
This commit is contained in:
PabstMirror 2016-01-05 15:29:52 -06:00
parent e2c08d2c26
commit 175624620c
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,7 @@
if (isNil "ACE_WIND_PARAMS") exitWith { [0, 0, 0] };
ACE_WIND_PARAMS params ["_dir", "_dirChange", "_spd", "_spdChange", "_period"];
//Wind _dir is the "source" of the wind [eg: "northerly wind": _dir = 0 -> wind = [0,-1,0];]
private _periodPosition = (ACE_time - GVAR(wind_period_start_time)) min _period;
private _periodPercent = _periodPosition / _period;

View File

@ -25,7 +25,9 @@ if (GVAR(useACEWeather)) then {
publicVariable "ACE_RAIN_PARAMS";
};
if (GVAR(syncWind)) then {
ACE_WIND_PARAMS = [wind call CBA_fnc_vectDir, 0, vectorMagnitude wind, 0, GVAR(serverUpdateInterval)];
//Wind _dir is the "source" of the wind [eg: "northerly wind": _dir = 0 -> wind = [0,-1,0];]
private _windDir = ((((wind select 0) atan2 (wind select 1)) + 180) % 360);
ACE_WIND_PARAMS = [_windDir, 0, vectorMagnitude wind, 0, GVAR(serverUpdateInterval)];
publicVariable "ACE_WIND_PARAMS";
};
if (GVAR(syncMisc)) then {