From 05f34e5d6a74a014a36c7a69d0f16bb3d58ccfd5 Mon Sep 17 00:00:00 2001 From: ulteq Date: Tue, 5 May 2015 22:21:29 +0200 Subject: [PATCH] Attempt to fix https://github.com/acemod/ACE3/issues/1025 --- addons/weather/functions/fnc_updateWind.sqf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf index 06bb57d093..b362458fdb 100644 --- a/addons/weather/functions/fnc_updateWind.sqf +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -13,11 +13,16 @@ if (!GVAR(syncWind)) exitWith { ACE_wind = wind }; +private ["_newWaves"]; + ACE_wind = [] call FUNC(getWind); setWind [ACE_wind select 0, ACE_wind select 1, true]; 2 setGusts 0; // Set waves: 0 when no wind, 1 when wind >= 16 m/s -1 setWaves (((vectorMagnitude ACE_wind) / 16.0) min 1.0); +_newWaves = ((vectorMagnitude ACE_wind) / 16.0) min 1.0; +if (abs(_newWaves - waves) > 0.1) then { + 1 setWaves _newWaves; +}; TRACE_3("Wind/ACE_wind/Deviation(m/s)",wind,ACE_wind,Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000);