Skip to content

Commit

Permalink
randomLCG doesn't like seed=0
Browse files Browse the repository at this point in the history
  • Loading branch information
mgkid3310 committed Jul 14, 2021
1 parent 55aa944 commit e97de3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/aerodynamics/functions/fnc_getWindPosASL.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private ["_timePassed", "_gustStrength"];
private _timeGrid = GVAR(maxGustDuration) * floor (_time / GVAR(maxGustDuration));
private _durationRatio = [1, [_timeGrid, 1]] call EFUNC(main,randomNumber2D);
private _timeDuration = linearConversion [0, 1, _durationRatio, GVAR(maxGustDuration) / 2, GVAR(maxGustDuration), true];
if (!(_dynamicWindMode < 2) && (([1, [_timeGrid, 0]] call EFUNC(main,randomNumber2D)) < GVAR(gustChance)) && (_time < (_timeGrid + _timeDuration))) then {
if (!(_dynamicWindMode < 2) && (([1, [_timeGrid, 2]] call EFUNC(main,randomNumber2D)) < GVAR(gustChance)) && (_time < (_timeGrid + _timeDuration))) then {
_timePassed = _time - _timeGrid;
_gustStrength = _altitudeProfile * gusts * GVAR(gustMultiplier);
_globalWind = _globalWind vectorMultiply (1 + _gustStrength * sin (180 * _timePassed / _timeDuration));
Expand Down

0 comments on commit e97de3b

Please sign in to comment.