mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix inverting wind direction each sync update
Fix #1052 (and maybe #1708)
This commit is contained in:
parent
e2c08d2c26
commit
175624620c
@ -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;
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user