From e2c08d2c26fe09440f4a396006dba3200c1f4d84 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 5 Jan 2016 01:39:29 -0600 Subject: [PATCH 1/3] Privates, Headers, Merge 4 PFEH into one --- addons/weather/CfgVehicles.hpp | 2 +- addons/weather/CfgWorlds.hpp | 2 +- addons/weather/RscTitles.hpp | 14 ++-- addons/weather/XEH_postInit.sqf | 42 ++++++++-- addons/weather/XEH_postServerInit.sqf | 8 +- .../functions/fnc_calculateAirDensity.sqf | 16 ++-- .../fnc_calculateBarometricPressure.sqf | 7 +- .../fnc_calculateDensityAltitude.sqf | 7 +- .../functions/fnc_calculateDewPoint.sqf | 14 ++-- .../functions/fnc_calculateHeatIndex.sqf | 9 +- .../fnc_calculateRoughnessLength.sqf | 16 ++-- .../functions/fnc_calculateSpeedOfSound.sqf | 9 +- .../fnc_calculateTemperatureAtHeight.sqf | 7 +- .../functions/fnc_calculateWetBulb.sqf | 25 +++--- .../functions/fnc_calculateWindChill.sqf | 6 +- .../functions/fnc_calculateWindSpeed.sqf | 37 +++++---- .../weather/functions/fnc_displayWindInfo.sqf | 20 +++-- addons/weather/functions/fnc_getMapData.sqf | 8 +- addons/weather/functions/fnc_getWind.sqf | 12 +-- .../functions/fnc_initModuleSettings.sqf | 3 + addons/weather/functions/fnc_initWind.sqf | 19 +++-- .../functions/fnc_serverController.sqf | 8 +- .../functions/fnc_updateAceWeather.sqf | 83 ++++++++++--------- .../weather/functions/fnc_updateHumidity.sqf | 19 +++-- addons/weather/functions/fnc_updateRain.sqf | 17 ++-- .../functions/fnc_updateTemperature.sqf | 13 +-- addons/weather/functions/fnc_updateWind.sqf | 10 ++- addons/weather/script_component.hpp | 5 +- 28 files changed, 254 insertions(+), 184 deletions(-) diff --git a/addons/weather/CfgVehicles.hpp b/addons/weather/CfgVehicles.hpp index f37a62449a..f98a1e50f5 100644 --- a/addons/weather/CfgVehicles.hpp +++ b/addons/weather/CfgVehicles.hpp @@ -53,4 +53,4 @@ class CfgVehicles { description = CSTRING(Module_Description); }; }; -}; \ No newline at end of file +}; diff --git a/addons/weather/CfgWorlds.hpp b/addons/weather/CfgWorlds.hpp index 1391468fd9..dd0a616272 100644 --- a/addons/weather/CfgWorlds.hpp +++ b/addons/weather/CfgWorlds.hpp @@ -48,4 +48,4 @@ class CfgWorlds { {0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02}, // November {0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02}};// December }; -}; \ No newline at end of file +}; diff --git a/addons/weather/RscTitles.hpp b/addons/weather/RscTitles.hpp index aedebdabfc..d89c8d0671 100644 --- a/addons/weather/RscTitles.hpp +++ b/addons/weather/RscTitles.hpp @@ -1,17 +1,13 @@ -class RscTitles -{ - class RscWindIntuitive - { +class RscTitles { + class RscWindIntuitive { idd=-1; onLoad="with uiNameSpace do { RscWindIntuitive = _this select 0 };"; movingEnable=0; duration=60; fadeIn="false"; fadeOut="false"; - class controls - { - class RscWindIntuitive - { + class controls { + class RscWindIntuitive { idc=132948; type=0; style=48; @@ -28,4 +24,4 @@ class RscTitles }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index c6f779358f..f5ef929ff2 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -40,12 +40,40 @@ GVAR(ACE_rain) = rain; simulWeatherSync; -[FUNC(updateTemperature), 20, []] call CBA_fnc_addPerFrameHandler; -[FUNC(updateHumidity), 20, []] call CBA_fnc_addPerFrameHandler; -[FUNC(updateWind), 1, []] call CBA_fnc_addPerFrameHandler; -[FUNC(updateRain), 2, []] call CBA_fnc_addPerFrameHandler; -[{ + + + +["SettingsInitialized",{ + TRACE_1("SettingsInitialized",GVAR(syncRain)); + + //Create a 1 sec delay PFEH to update rain every frame: if (GVAR(syncRain)) then { - 0 setRain GVAR(ACE_rain); + [{ + 0 setRain GVAR(ACE_rain); + }, 0, []] call CBA_fnc_addPerFrameHandler; }; -}, 0, []] call CBA_fnc_addPerFrameHandler; \ No newline at end of file + + //Create a 1 sec delay PFEH to update wind/rain/temp/humidity + + //If we don't sync rain, set next time to infinity + GVAR(nextUpdateRain) = if (GVAR(syncRain)) then {0} else {1e99}; + GVAR(nextUpdateTempAndHumidity) = 0; + [{ + BEGIN_COUNTER(weatherPFEH); + + [] call FUNC(updateWind); //Every 1 second + + if (ACE_time > GVAR(nextUpdateRain)) then { + [] call FUNC(updateRain); //Every 2 seconds + GVAR(nextUpdateRain) = 2 + ACE_time; + }; + if (ACE_time > GVAR(nextUpdateTempAndHumidity)) then { + [] call FUNC(updateTemperature); //Every 20 seconds + [] call FUNC(updateHumidity); //Every 20 seconds + GVAR(nextUpdateTempAndHumidity) = 20 + ACE_time; + }; + + END_COUNTER(weatherPFEH); + }, 1, []] call CBA_fnc_addPerFrameHandler; + +}] call EFUNC(common,addEventHandler); diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf index aa733afa5d..f7b830b11d 100644 --- a/addons/weather/XEH_postServerInit.sqf +++ b/addons/weather/XEH_postServerInit.sqf @@ -9,4 +9,10 @@ GVAR(rain_current_range) = -1+(random 2); // Wind call FUNC(initWind); -[FUNC(serverController), GVAR(serverUpdateInterval)] call CBA_fnc_addPerFrameHandler; +["SettingsInitialized", { + TRACE_2("SettingsInitialized",GVAR(enableServerController),GVAR(serverUpdateInterval)); + + if (GVAR(enableServerController)) then { + [FUNC(serverController), GVAR(serverUpdateInterval)] call CBA_fnc_addPerFrameHandler; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/weather/functions/fnc_calculateAirDensity.sqf b/addons/weather/functions/fnc_calculateAirDensity.sqf index f3de65f99d..bda8410ddd 100644 --- a/addons/weather/functions/fnc_calculateAirDensity.sqf +++ b/addons/weather/functions/fnc_calculateAirDensity.sqf @@ -1,18 +1,19 @@ /* * Author: Ruthberg - * * Calculates the air density * * Arguments: - * 0: temperature - degrees celcius + * 0: temperature - degrees celsius * 1: pressure - hPa * 2: relativeHumidity - value between 0.0 and 1.0 * * Return Value: * density of air - kg * m^(-3) * - * Return value: - * None + * Example: + * [0, 1020, 0.5] call ace_weather_fnc_calculateAirDensity + * + * Public: No */ #include "script_component.hpp" @@ -21,11 +22,10 @@ params ["_temperature", "_pressure", "_relativeHumidity"]; _pressure = _pressure * 100; // hPa to Pa if (_relativeHumidity > 0) then { - private ["_pSat", "_vaporPressure", "_partialPressure"]; // Saturation vapor pressure calculated according to: http://wahiduddin.net/calc/density_algorithms.htm - _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); - _vaporPressure = _relativeHumidity * _pSat; - _partialPressure = _pressure - _vaporPressure; + private _pSat = 6.1078 * 10 ^ ((7.5 * _temperature) / (_temperature + 237.3)); + private _vaporPressure = _relativeHumidity * _pSat; + private _partialPressure = _pressure - _vaporPressure; (_partialPressure * DRY_AIR_MOLAR_MASS + _vaporPressure * WATER_VAPOR_MOLAR_MASS) / (UNIVERSAL_GAS_CONSTANT * KELVIN(_temperature)) } else { diff --git a/addons/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf index 134a741127..29b8fa7877 100644 --- a/addons/weather/functions/fnc_calculateBarometricPressure.sqf +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Calculates the barometric pressure based on altitude and weather * * Arguments: @@ -9,8 +8,10 @@ * Return Value: * barometric pressure - hPA * - * Return value: - * None + * Example: + * 0 call ace_weather_fnc_calculateBarometricPressure + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateDensityAltitude.sqf b/addons/weather/functions/fnc_calculateDensityAltitude.sqf index 97889e2499..8dea9849b1 100644 --- a/addons/weather/functions/fnc_calculateDensityAltitude.sqf +++ b/addons/weather/functions/fnc_calculateDensityAltitude.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Calculates density altitude for a given air density * * Arguments: @@ -9,8 +8,10 @@ * Return Value: * density altitude - m * - * Return value: - * None + * Example: + * 1.225 call ace_weather_fnc_calculateDensityAltitude + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateDewPoint.sqf b/addons/weather/functions/fnc_calculateDewPoint.sqf index cbfc606054..81db9565dc 100644 --- a/addons/weather/functions/fnc_calculateDewPoint.sqf +++ b/addons/weather/functions/fnc_calculateDewPoint.sqf @@ -1,17 +1,18 @@ /* * Author: Ruthberg - * * Calculates dew point based on temperature and relative humidity * * Arguments: - * 0: temperature - degrees celcius - * 2: relativeHumidity - value between 0.0 and 1.0 + * 0: temperature - degrees celsius + * 1: relativeHumidity - value between 0.0 and 1.0 * * Return Value: * dew point * - * Return value: - * None + * Example: + * [32, 0.4] call ace_weather_fnc_calculateDewPoint + * + * Public: No */ #include "script_component.hpp" @@ -24,7 +25,6 @@ if (_rh == 0) exitWith { CELSIUS(0) }; // Source: https://en.wikipedia.org/wiki/Dew_point -private ["_gamma"]; -_gamma = ln(_rh) + (__b * _t) / (__c + _t); +private _gamma = ln(_rh) + (__b * _t) / (__c + _t); (__c * _gamma) / (__b - _gamma) diff --git a/addons/weather/functions/fnc_calculateHeatIndex.sqf b/addons/weather/functions/fnc_calculateHeatIndex.sqf index 057c13d7ad..a4626128de 100644 --- a/addons/weather/functions/fnc_calculateHeatIndex.sqf +++ b/addons/weather/functions/fnc_calculateHeatIndex.sqf @@ -1,17 +1,18 @@ /* * Author: Ruthberg - * * Calculates heat index based on temperature and relative humidity * * Arguments: - * 0: temperature - degrees celcius + * 0: temperature - degrees celsius * 1: relativeHumidity - value between 0.0 and 1.0 * * Return Value: * heat index * - * Return value: - * None + * Example: + * [36, 0.75] call ace_weather_fnc_calculateHeatIndex + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateRoughnessLength.sqf b/addons/weather/functions/fnc_calculateRoughnessLength.sqf index 4fd0d18fb3..423f3fc3d6 100644 --- a/addons/weather/functions/fnc_calculateRoughnessLength.sqf +++ b/addons/weather/functions/fnc_calculateRoughnessLength.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Calculates the terrain roughness length at a given world position * * Arguments: @@ -9,19 +8,20 @@ * Return Value: * roughness length * + * Example: + * (getPosASL player) call ace_weather_fnc_calculateRoughnessLength + * * Public: No */ #include "script_component.hpp" -private ["_roughness_lengths", "_windSource", "_nearBuildings", "_isWater"]; - // Source: http://es.ucsc.edu/~jnoble/wind/extrap/index.html -_roughness_lengths = [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6]; +#define ROUGHNESS_LENGTHS [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6] -_windSource = _this vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 25); +private _windSource = _this vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 25); -_nearBuildings = count (_windSource nearObjects ["Building", 50]); -_isWater = surfaceIsWater _windSource; +private _nearBuildings = count (_windSource nearObjects ["Building", 50]); +private _isWater = surfaceIsWater _windSource; if (_nearBuildings == 0 && _isWater) exitWith { 0.0005 @@ -31,4 +31,4 @@ if (_nearBuildings >= 10) exitWith { 1.6 }; -_roughness_lengths select (2 + (_nearBuildings min 6)) +ROUGHNESS_LENGTHS select (2 + (_nearBuildings min 6)) diff --git a/addons/weather/functions/fnc_calculateSpeedOfSound.sqf b/addons/weather/functions/fnc_calculateSpeedOfSound.sqf index 322ba75ac5..f645ba2368 100644 --- a/addons/weather/functions/fnc_calculateSpeedOfSound.sqf +++ b/addons/weather/functions/fnc_calculateSpeedOfSound.sqf @@ -1,16 +1,17 @@ /* * Author: Ruthberg - * * Calculates the speed of sound for a given temperature * * Arguments: - * temperature - degrees celcius + * temperature - degrees celsius * * Return Value: * speed of sound - m/s * - * Return value: - * None + * Example: + * 0 call ace_weather_fnc_calculateSpeedOfSound + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf b/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf index 5e02795d59..e33b8213eb 100644 --- a/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf +++ b/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Calculates the temperature based on altitude and weather * * Arguments: @@ -9,8 +8,10 @@ * Return Value: * temperature - degrees celsius * - * Return value: - * None + * Example: + * 500 call ace_weather_fnc_calculateTemperatureAtHeight + * + * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateWetBulb.sqf b/addons/weather/functions/fnc_calculateWetBulb.sqf index 94e96cd11b..a8a58b0dc3 100644 --- a/addons/weather/functions/fnc_calculateWetBulb.sqf +++ b/addons/weather/functions/fnc_calculateWetBulb.sqf @@ -1,36 +1,35 @@ /* * Author: Ruthberg - * * Calculates wet bulb based on temperature and relative humidity * * Arguments: - * 0: temperature - degrees celcius + * 0: temperature - degrees celsius * 1: pressure - hPa * 2: relativeHumidity - value between 0.0 and 1.0 * * Return Value: * wet bulb * - * Return value: - * None + * Example: + * [0, 1020, 0.5] call ace_weather_fnc_calculateWetBulb + * + * Public: No */ #include "script_component.hpp" -private ["_es", "_e", "_eDiff", "_eGuessPrev", "_cTempDelta", "_twGuess", "_eguess"]; - params ["_temperature", "_pressure", "_relativeHumidity"]; // Source: http://cosmoquest.org/forum/showthread.php?155366-Calculating-Wet-Bulb-Temperature-from-RH-amp-Dry-Bulb -_es = 6.112 * exp((17.67 * _temperature) / (_temperature + 243.5)); -_e = _es * _relativeHumidity; -_eDiff = _es - _e; -_eGuessPrev = _es; -_cTempDelta = 3.3145; -_twGuess = _temperature; +private _es = 6.112 * exp((17.67 * _temperature) / (_temperature + 243.5)); +private _e = _es * _relativeHumidity; +private _eDiff = _es - _e; +private _eGuessPrev = _es; +private _cTempDelta = 3.3145; +private _twGuess = _temperature; for "_j" from 1 to 50 do { _twGuess = _twGuess - _cTempDelta; - _eguess = 6.112 * exp((17.67 * _twGuess) / (_twGuess + 243.5)); + private _eguess = 6.112 * exp((17.67 * _twGuess) / (_twGuess + 243.5)); _eguess = _eguess - (_pressure * (_temperature - _twGuess) * 0.00066 * (1 + (0.00115 * _twGuess))); _eDiff = _eguess - _e; if (abs(_eDiff) <= 0.001) exitWith {}; diff --git a/addons/weather/functions/fnc_calculateWindChill.sqf b/addons/weather/functions/fnc_calculateWindChill.sqf index ee3a20283b..0e17d53377 100644 --- a/addons/weather/functions/fnc_calculateWindChill.sqf +++ b/addons/weather/functions/fnc_calculateWindChill.sqf @@ -1,15 +1,17 @@ /* * Author: Ruthberg - * * Calculates wind chill based on temperature and wind speed * * Arguments: - * 0: temperature - degrees celcius + * 0: temperature - degrees celsius * 1: wind speed - m/s * * Return Value: * wind chill * + * Example: + * [0, 10] call ace_weather_fnc_calculateWindChill + * * Public: No */ #include "script_component.hpp" diff --git a/addons/weather/functions/fnc_calculateWindSpeed.sqf b/addons/weather/functions/fnc_calculateWindSpeed.sqf index 87c6c49d42..206bc1d298 100644 --- a/addons/weather/functions/fnc_calculateWindSpeed.sqf +++ b/addons/weather/functions/fnc_calculateWindSpeed.sqf @@ -1,43 +1,42 @@ /* * Author: Ruthberg - * * Calculates the true wind speed at a given world position * * Arguments: * 0: world position - posASL - * 1: Account for wind gradient + * 1: Account for wind gradient (used in advanced ballistics) * 2: Account for terrain * 3: Account for obstacles * * Return Value: * wind speed - m/s * + * Example: + * [eyePos ACE_player, true, true, true] call ace_weather_fnc_calculateWindSpeed; + * * Public: No */ #include "script_component.hpp" -private ["_fnc_polar2vect", "_windSpeed", "_windDir", "_windDirAdjusted", "_height", "_newWindSpeed", "_windSource", "_roughnessLength"]; - params ["_position", "_windGradientEnabled", "_terrainEffectEnabled", "_obstacleEffectEnabled"]; -_fnc_polar2vect = { - private ["_mag2D"]; - params ["_x", "_y", "_z"]; - _mag2D = _x * cos(_z); - [_mag2D * sin(_y), _mag2D * cos(_y), _x * sin(_z)]; +private _fnc_polar2vect = { + params ["_mag","_dir","_elev"]; + private _mag2D = _mag * cos(_elev); + [_mag2D * sin(_dir), _mag2D * cos(_dir), _mag * sin(_elev)]; }; -_windSpeed = vectorMagnitude ACE_wind; -_windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); -_windDirAdjusted = _windDir + 180; +private _windSpeed = vectorMagnitude ACE_wind; +private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); +private _windDirAdjusted = _windDir + 180; // Wind gradient if (_windGradientEnabled) then { if (_windSpeed > 0.05) then { - _height = (ASLToATL _position) select 2; + private _height = (ASLToATL _position) select 2; _height = 0 max _height min 20; if (_height < 20) then { - _roughnessLength = _position call FUNC(calculateRoughnessLength); + private _roughnessLength = _position call FUNC(calculateRoughnessLength); _windSpeed = _windSpeed * abs(ln(_height / _roughnessLength) / ln(20 / _roughnessLength)); }; }; @@ -46,9 +45,9 @@ if (_windGradientEnabled) then { // Terrain effect on wind if (_terrainEffectEnabled) then { if (_windSpeed > 0.05) then { - _newWindSpeed = 0; + private _newWindSpeed = 0; { - _windSource = [100, _windDirAdjusted, _x] call _fnc_polar2vect; + private _windSource = [100, _windDirAdjusted, _x] call _fnc_polar2vect; if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 9) * _windSpeed; }; @@ -60,6 +59,7 @@ if (_terrainEffectEnabled) then { if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 9) * _windSpeed; }; + nil } count [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; _windSpeed = _newWindSpeed; }; @@ -68,9 +68,9 @@ if (_terrainEffectEnabled) then { // Obstacle effect on wind if (_obstacleEffectEnabled) then { if (_windSpeed > 0.05) then { - _newWindSpeed = 0; + private _newWindSpeed = 0; { - _windSource = [20, _windDirAdjusted, _x] call _fnc_polar2vect; + private _windSource = [20, _windDirAdjusted, _x] call _fnc_polar2vect; if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 2) * _windSpeed; }; @@ -82,6 +82,7 @@ if (_obstacleEffectEnabled) then { if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 2) * _windSpeed; }; + nil } count [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]; _windSpeed = _newWindSpeed; }; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index 98d9026c1c..3e084c7aa5 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Displays a wind info (colored arrow) in the top left corner of the screen * * Argument: @@ -8,6 +7,11 @@ * * Return value: * None + * + * Example: + * [] call ace_weather_fnc_displayWindInfo + * + * Public: No */ #include "script_component.hpp" @@ -28,17 +32,15 @@ EGVAR(advanced_ballistics,Protractor) = false; GVAR(WindInfo) = true; [{ - private ["_windSpeed", "_windDir", "_playerDir", "_windIndex", "_windColor"]; - - if !(GVAR(WindInfo) && !(underwater ACE_player) && vehicle ACE_player == ACE_player) exitWith { + if ((!GVAR(WindInfo)) || {underwater ACE_player} || {vehicle ACE_player != ACE_player}) exitWith { GVAR(WindInfo) = false; 0 cutText ["", "PLAIN"]; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - _windIndex = 12; - _windColor = [1, 1, 1, 1]; - _windSpeed = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + private _windIndex = 12; + private _windColor = [1, 1, 1, 1]; + private _windSpeed = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { // With wind gradient [eyePos ACE_player, true, true, true] call FUNC(calculateWindSpeed); } else { @@ -47,8 +49,8 @@ GVAR(WindInfo) = true; }; if (_windSpeed > 0.2) then { - _playerDir = (ACE_player call CBA_fnc_headDir) select 0; - _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + private _playerDir = (ACE_player call CBA_fnc_headDir) select 0; + private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); _windIndex = round(((_playerDir - _windDir + 360) % 360) / 30); _windIndex = _windIndex % 12; }; diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index 2e39f80764..b344ad2bdf 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg, esteldunedain - * * Get the weather data for the current map * * Argument: @@ -8,6 +7,11 @@ * * Return value: * None + * + * Example: + * [] call ace_weather_fnc_getMapData + * + * Public: No */ #include "script_component.hpp" @@ -207,4 +211,4 @@ GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; GVAR(currentTemperature) = 20; -GVAR(currentHumidity) = 0.5; \ No newline at end of file +GVAR(currentHumidity) = 0.5; diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf index 7e133896a6..d087dc2498 100644 --- a/addons/weather/functions/fnc_getWind.sqf +++ b/addons/weather/functions/fnc_getWind.sqf @@ -1,6 +1,5 @@ /* * Author: ACE2 Team, Ruthberg - * * Calculate current wind locally from the data broadcasted by the server * * Argument: @@ -8,17 +7,20 @@ * * Return value: * Wind + * + * Example: + * [] call ace_weather_fnc_getWind + * + * Public: No */ #include "script_component.hpp" -private ["_periodPercent", "_periodPosition"]; - if (isNil "ACE_WIND_PARAMS") exitWith { [0, 0, 0] }; ACE_WIND_PARAMS params ["_dir", "_dirChange", "_spd", "_spdChange", "_period"]; -_periodPosition = (ACE_time - GVAR(wind_period_start_time)) min _period; -_periodPercent = _periodPosition / _period; +private _periodPosition = (ACE_time - GVAR(wind_period_start_time)) min _period; +private _periodPercent = _periodPosition / _period; _spd = _spd + _spdChange * _periodPercent; _dir = _dir + _dirChange * _periodPercent; diff --git a/addons/weather/functions/fnc_initModuleSettings.sqf b/addons/weather/functions/fnc_initModuleSettings.sqf index 034612ab58..f1e9c1d6fc 100644 --- a/addons/weather/functions/fnc_initModuleSettings.sqf +++ b/addons/weather/functions/fnc_initModuleSettings.sqf @@ -10,6 +10,9 @@ * Return Value: * None * + * Example: + * [module, [], true] call ace_weather_fnc_initModuleSettings + * * Public: No */ diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf index 10b22efa2a..4c88f59f95 100644 --- a/addons/weather/functions/fnc_initWind.sqf +++ b/addons/weather/functions/fnc_initWind.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Inits the wind variables on mission start * * Argument: @@ -8,28 +7,32 @@ * * Return value: * None + * + * Example: + * [] call ace_weather_fnc_initWind + * + * Public: No */ #include "script_component.hpp" -private ["_sum", "_rand", "_csum", "_index", "_month", "_windDirectionProbabilities"]; -_month = date select 1; -_windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1); +private _month = date select 1; +private _windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1); ACE_wind = [0, 0, 0]; GVAR(wind_direction_reference) = random 360; -_sum = 0; +private _sum = 0; for "_i" from 0 to 7 do { _sum = _sum + (_windDirectionProbabilities select _i); }; -_rand = random _sum; -_csum = [0, 0, 0, 0, 0, 0, 0, 0]; +private _rand = random _sum; +private _csum = [0, 0, 0, 0, 0, 0, 0, 0]; for "_i" from 0 to 7 do { for "_j" from 0 to _i do { _csum set [_i, (_csum select _i) + (_windDirectionProbabilities select _j)]; }; }; -_index = 0; +private _index = 0; for "_i" from 0 to 7 do { if (_rand > (_csum select _i)) then { _index = _index + 1; diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf index 2cbdeb581e..4ac859751b 100644 --- a/addons/weather/functions/fnc_serverController.sqf +++ b/addons/weather/functions/fnc_serverController.sqf @@ -1,6 +1,5 @@ /* * Author: Ruthberg - * * Gather weather parameters and broadcast them to the clients * * Argument: @@ -8,11 +7,14 @@ * * Return value: * None + * + * Example: + * [] call ace_weather_fnc_serverController + * + * Public: No */ #include "script_component.hpp" -if (!GVAR(enableServerController)) exitWith {}; - if (GVAR(useACEWeather)) then { // Use location based real world weather data [] call FUNC(updateAceWeather); diff --git a/addons/weather/functions/fnc_updateAceWeather.sqf b/addons/weather/functions/fnc_updateAceWeather.sqf index 029e1eb89b..2eb264d91b 100644 --- a/addons/weather/functions/fnc_updateAceWeather.sqf +++ b/addons/weather/functions/fnc_updateAceWeather.sqf @@ -1,6 +1,5 @@ /* * Author: ACE2 Team, esteldunedain, ruthberg - * * Updates the wind and rain evolution on the server. Broadcasts the current and next values to the clients * * Argument: @@ -8,40 +7,44 @@ * * Return value: * None + * + * Example: + * [] call ace_weather_fnc_updateAceWeather + * + * Public: No */ #include "script_component.hpp" -private ["_overcastMultiplier", "_lastRain", "_rainOverCast", "_transitionTime", "_windDirectionVariance", "_windSpeed", "_windSpeedChange", "_windMaxDiff", "_windMinDiff", "_windDirection", "_windDirectionChange", "_ratioMin", "_ratioMax"]; - -_overcastMultiplier = 1 max (2* overcast) min 2; // 0 (@ overcast 0), 2 (@ overcast 1) +private _overcastMultiplier = 1 max (2* overcast) min 2; // 0 (@ overcast 0), 2 (@ overcast 1) // Rain simulation -if (GVAR(syncRain) && GVAR(rain_period_count) > GVAR(rain_next_period)) then { +if (GVAR(syncRain) && {GVAR(rain_period_count) > GVAR(rain_next_period)}) then { GVAR(rain_next_period) = ceil((1 + (random 10)) / _overcastMultiplier); GVAR(rain_period_count) = 0; - - _lastRain = GVAR(current_rain); - + + private _lastRain = GVAR(current_rain); + private _rainOverCast = 0; + if (overcast >= 0.7) then { _rainOverCast = (overcast - 0.7) / 0.3; if (GVAR(current_rain) == 0) then { // Initialize rain with a random strength depending on the current overcast value GVAR(current_rain) = -0.25 + (random 0.75) + (random 0.5) * _rainOverCast; }; - + GVAR(current_rain) = GVAR(current_rain) + GVAR(current_rain) * ((_rainOverCast * _overcastMultiplier) / 8) * GVAR(rain_current_range); GVAR(current_rain) = 0 max GVAR(current_rain) min 1; - + GVAR(rain_current_range) = -1 + (random 2); } else { _rainOverCast = 1; - + GVAR(current_rain) = 0; }; - - _transitionTime = 1 + (_rainOverCast * 5) + (random (_rainOverCast * 20)); - + + private _transitionTime = 1 + (_rainOverCast * 5) + (random (_rainOverCast * 20)); + ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime]; TRACE_4("",_lastRain,_rainOverCast,_transitionTime,overcast); @@ -50,47 +53,47 @@ if (GVAR(syncRain) && GVAR(rain_period_count) > GVAR(rain_next_period)) then { }; // Wind simulation -if (GVAR(syncWind) && GVAR(wind_period_count) > GVAR(wind_next_period)) then { - +if (GVAR(syncWind) && {GVAR(wind_period_count) > GVAR(wind_next_period)}) then { + GVAR(wind_next_period) = ceil((2 + (random 5)) / _overcastMultiplier); GVAR(wind_period_count) = 0; - - _windDirectionVariance = (90 - (random 180)) * (overcast ^ 2); - _windDirection = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360; - _windDirectionChange = _windDirection - GVAR(current_wind_direction); + + private _windDirectionVariance = (90 - (random 180)) * (overcast ^ 2); + private _windDirection = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360; + private _windDirectionChange = _windDirection - GVAR(current_wind_direction); if (_windDirectionChange > 180) then { _windDirectionChange = _windDirectionChange - 360; }; if (_windDirectionChange < -180) then { _windDirectionChange = 360 + _windDirectionChange; }; - - _windMaxDiff = GVAR(mean_wind_speed) - GVAR(max_wind_speed); - _windMinDiff = GVAR(min_wind_speed) - GVAR(mean_wind_speed); - - _ratioMax = (random 1) ^ 2; - _ratioMin = (random 1) ^ 2; - - _windSpeed = GVAR(current_wind_speed); - _windSpeedChange = 0; + + private _windMaxDiff = GVAR(mean_wind_speed) - GVAR(max_wind_speed); + private _windMinDiff = GVAR(min_wind_speed) - GVAR(mean_wind_speed); + + private _ratioMax = (random 1) ^ 2; + private _ratioMin = (random 1) ^ 2; + + private _windSpeed = GVAR(current_wind_speed); + private _windSpeedChange = 0; if ((random 1) < (0.3 max overcast)) then { _windSpeed = GVAR(mean_wind_speed) + _windMaxDiff * _ratioMax + _windMinDiff * _ratioMin; _windSpeedChange = _windSpeed - GVAR(current_wind_speed); }; - - _transitionTime = GVAR(wind_next_period) * GVAR(serverUpdateInterval); - + + private _transitionTime = GVAR(wind_next_period) * GVAR(serverUpdateInterval); + TRACE_5("dirCur/dirNew/spdCur/spdNew/period",GVAR(current_wind_direction),_windDirection,GVAR(current_wind_speed),_windSpeed,_transitionTime); - + ACE_WIND_PARAMS = [GVAR(current_wind_direction), - _windDirectionChange, - GVAR(current_wind_speed), - _windSpeedChange, - _transitionTime]; - + _windDirectionChange, + GVAR(current_wind_speed), + _windSpeedChange, + _transitionTime]; + GVAR(current_wind_direction) = _windDirection; GVAR(current_wind_speed) = _windSpeed; - + GVAR(wind_period_start_time) = ACE_time; publicVariable "ACE_WIND_PARAMS"; }; @@ -102,4 +105,4 @@ if (GVAR(syncMisc)) then { }; GVAR(rain_period_count) = GVAR(rain_period_count) + 1; -GVAR(wind_period_count) = GVAR(wind_period_count) + 1; \ No newline at end of file +GVAR(wind_period_count) = GVAR(wind_period_count) + 1; diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf index df6e64df5d..3ea28d6a44 100644 --- a/addons/weather/functions/fnc_updateHumidity.sqf +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -1,27 +1,30 @@ /* * Author: ACE2 Team - * - * Updates GVAR(currentHumidity) based on + * Updates GVAR(currentHumidity) * * Argument: * Nothing * * Return value: * Nothing + * + * Example: + * [] call ace_weather_fnc_updateHumidity + * + * Public: No */ #include "script_component.hpp" -private ["_month", "_avgTemperature", "_pS1", "_pS2"]; -_month = date select 1; +private _month = date select 1; GVAR(currentHumidity) = (GVAR(Humidity) select (_month - 1)) / 100; -if (rain > 0 && overcast > 0.7) then { +if ((rain > 0) && {overcast > 0.7}) then { GVAR(currentHumidity) = 1; } else { - _avgTemperature = ((GVAR(TempDay) select (_month - 1)) + (GVAR(TempNight) select (_month - 1))) / 2; - _pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature)); - _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); + private _avgTemperature = ((GVAR(TempDay) select (_month - 1)) + (GVAR(TempNight) select (_month - 1))) / 2; + private _pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature)); + private _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2; GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift); diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf index 6c4c829747..8fa18500e8 100644 --- a/addons/weather/functions/fnc_updateRain.sqf +++ b/addons/weather/functions/fnc_updateRain.sqf @@ -1,6 +1,5 @@ /* * Author: ACE2 Team, Ruthberg - * * Updates rain based on ACE_RAIN_PARAMS * * Argument: @@ -8,17 +7,21 @@ * * Return value: * Nothing + * + * Example: + * [] call ace_weather_fnc_updateRain + * + * Public: No */ #include "script_component.hpp" -if (!GVAR(syncRain)) exitWith {}; - if (!isNil "ACE_RAIN_PARAMS") then { ACE_RAIN_PARAMS params ["_oldRain", "_newRain", "_period"]; - private ["_periodPosition", "_periodPercent"]; - _periodPosition = (ACE_time - GVAR(rain_period_start_time)) min _period; - _periodPercent = (_periodPosition / _period) min 1; + private _periodPosition = (ACE_time - GVAR(rain_period_start_time)) min _period; + private _periodPercent = (_periodPosition / _period) min 1; - GVAR(ACE_Rain) = (_oldRain + (_newRain - _oldRain) * _periodPercent); + GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), ACE_time, _oldRain, _newRain]; + + TRACE_3("Update Rain",rain,ACE_RAIN_PARAMS,GVAR(ACE_Rain)); }; diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 82f126e33f..9ff11859f4 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -1,6 +1,5 @@ /* * Author: ACE2 Team - * * Updates GVAR(currentTemperature) based on the map data * * Argument: @@ -8,14 +7,18 @@ * * Return value: * Nothing + * + * Example: + * [] call ace_weather_fnc_updateTemperature + * + * Public: No */ #include "script_component.hpp" -private ["_time", "_month", "_timeRatio"]; -_time = daytime; -_month = date select 1; +private _time = daytime; +private _month = date select 1; -_timeRatio = abs(_time - 12) / 12; +private _timeRatio = abs(_time - 12) / 12; GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _timeRatio) + (GVAR(TempNight) select (_month - 1)) * _timeRatio; GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * overcast; diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf index b362458fdb..75724e3674 100644 --- a/addons/weather/functions/fnc_updateWind.sqf +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -1,6 +1,5 @@ /* * Author: ACE2 Team, Ruthberg - * * Updates wind, gusts and waves based on ACE_wind * * Argument: @@ -8,19 +7,22 @@ * * Return value: * Nothing + * + * Example: + * [] call ace_weather_fnc_updateWind + * + * Public: No */ #include "script_component.hpp" 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 -_newWaves = ((vectorMagnitude ACE_wind) / 16.0) min 1.0; +private _newWaves = ((vectorMagnitude ACE_wind) / 16.0) min 1.0; if (abs(_newWaves - waves) > 0.1) then { 1 setWaves _newWaves; }; diff --git a/addons/weather/script_component.hpp b/addons/weather/script_component.hpp index 2a6aeb0393..c2df236d53 100644 --- a/addons/weather/script_component.hpp +++ b/addons/weather/script_component.hpp @@ -1,6 +1,9 @@ #define COMPONENT weather #include "\z\ace\addons\main\script_mod.hpp" -//#define DEBUG_ENABLED_WEATHER + +// #define DEBUG_MODE_FULL +// #define ENABLE_PERFORMANCE_COUNTERS + #ifdef DEBUG_ENABLED_WEATHER #define DEBUG_MODE_FULL #endif From 175624620c4df6e2149cc1af9f2b14c99fb767fd Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 5 Jan 2016 15:29:52 -0600 Subject: [PATCH 2/3] Fix inverting wind direction each sync update Fix #1052 (and maybe #1708) --- addons/weather/functions/fnc_getWind.sqf | 1 + addons/weather/functions/fnc_serverController.sqf | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf index d087dc2498..c9ccd43ff9 100644 --- a/addons/weather/functions/fnc_getWind.sqf +++ b/addons/weather/functions/fnc_getWind.sqf @@ -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; diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf index 4ac859751b..9791049914 100644 --- a/addons/weather/functions/fnc_serverController.sqf +++ b/addons/weather/functions/fnc_serverController.sqf @@ -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 { From 066976766f54edae4f5850cf4f677708da0ded99 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 6 Jan 2016 16:26:16 -0600 Subject: [PATCH 3/3] Show beaufort dots on wind display -for color Blind Show dots on the wind display so color blind can still determine wind level Replace PR #1308 --- .../functions/fnc_displayProtractor.sqf | 2 +- addons/weather/UI/wind0.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind1.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind10.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind11.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind2.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind3.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind4.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind5.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind6.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind7.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind8.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind9.paa | Bin 22016 -> 0 bytes addons/weather/UI/wind_arrow_ca.paa | Bin 0 -> 33076 bytes addons/weather/UI/wind_dot_ca.paa | Bin 0 -> 22016 bytes .../UI/{wind12.paa => wind_noneCircle_ca.paa} | Bin addons/weather/XEH_postInit.sqf | 22 +++-- .../weather/functions/fnc_displayWindInfo.sqf | 89 +++++++++++------- 18 files changed, 70 insertions(+), 43 deletions(-) delete mode 100644 addons/weather/UI/wind0.paa delete mode 100644 addons/weather/UI/wind1.paa delete mode 100644 addons/weather/UI/wind10.paa delete mode 100644 addons/weather/UI/wind11.paa delete mode 100644 addons/weather/UI/wind2.paa delete mode 100644 addons/weather/UI/wind3.paa delete mode 100644 addons/weather/UI/wind4.paa delete mode 100644 addons/weather/UI/wind5.paa delete mode 100644 addons/weather/UI/wind6.paa delete mode 100644 addons/weather/UI/wind7.paa delete mode 100644 addons/weather/UI/wind8.paa delete mode 100644 addons/weather/UI/wind9.paa create mode 100644 addons/weather/UI/wind_arrow_ca.paa create mode 100644 addons/weather/UI/wind_dot_ca.paa rename addons/weather/UI/{wind12.paa => wind_noneCircle_ca.paa} (100%) diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 1f7e2ecde7..5ad6cb111e 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -28,7 +28,7 @@ if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false }; 2 cutText ["", "PLAIN"]; EGVAR(weather,WindInfo) = false; -0 cutText ["", "PLAIN"]; +(["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; GVAR(Protractor) = true; [{ diff --git a/addons/weather/UI/wind0.paa b/addons/weather/UI/wind0.paa deleted file mode 100644 index c049caf47e632796f568c14e56de06771977b2ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPQAkr!7(UVrLDZQw0ucmdrSr+N`deeo@$$cO?T zdk{(~?u+%Ri>Rjxb(9YpJp|2V45HoEf42Q+(--w+wR^tHxp=>E@!bFa{_p?KIomzu z=|I5Odm#|?*@O^@MB-=$5BM%goTfwKfUnChaT%QwU-tXEy>vZ6=QLg1?h)dCuMm&> zgxI9>;KzjgA6|98>`(!^0ERyh4|xwj570wC8jv5M2k4;`_0as(2(`H*I~>2RQ6n5% zXoxXpn}Dqu-}TX(k<{n-ALjSu(&G5)oVm^z{AWF2Rex0OM4zQobJD!be5Yc=lX~MZ zR~UnTYw_=RYlI#dBb&@GXEnyoU+KiH^luO2W1{1(vt!E181Ycr@o?f(GV(JxtkyFs zW#xZ8V=}*$-|4FRM;YVl_2)xt535!gga6Xze=mOngUj*MyLgKE4fao)t1~9}CWo-E zX#kWF z0>=M(pTdyZDD|8=T=_AALqJQ-=?`rbaj*brN+!ZLI&A6S0;lQWR{|JU|5()3HnjRv#F|MFP- zJ3k zM%s*#diH;7u(Z>-T`mR6y+*SKn{{rIHp!xWvlu(B9&XdD&Ku+-Bc$Bq>Z4M(aPVr^ zxhKqBhYWL1r|dufC9l&({TJZ9_Ev}rxh&e;VuWe$81>kWMq{Y3NH;Z0_Cqmt%W(&> ZzmV_7Mj4g-StmkuXUgui@@?7P{sOn}!Cn9W diff --git a/addons/weather/UI/wind1.paa b/addons/weather/UI/wind1.paa deleted file mode 100644 index 47d996fe67e0c9e06fa95c916cd4699d03876db5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPeN01H4bw@;1j2X~KQc3iGf^BLZn%xM8k1&mBg-V3xVV2z)@|WM1B5Ec1WlN3a}+8wzyf|jQFIe*x!(Kgd2Qc6-5e?K-g!yG z`|)1id*}B%=iGbly?wFNXe{1VVtlqZh7d9{GqXa%&lNw#F=ZRa#^NUhj-%Lz<7Wh6 zOA*_*v(F*6^Y+t(yuXc*56TG{W1pMf?ED%<^7;IRGGIH1kq`8T00S5g7!Lt&!2F2u zfboFw5MTh~VPWDSe z>>jxuv2%YYLw^8%mYRMG{XB`|y`K4Tix2F5>$5|?OLT@qsb1B8$?}CG!v%Pu?~m8> zGq70vrcDdx8wQI9?hjcHaB^>=H!jE@F8kYy95{~pEv|mI%l{ndJF>a#*h$b+sXvV; zq|zS!5ggBJYSFt{N&tMj_s8!quKy(Ei8bj#dPe<|XdH9|={rU*(YeHV(0f&fqr%sD4n~`#jjQeX`IyK>sQPoQeHKNpj#rZTc(i$#?l$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m5zG4{+x_AMF()WX8mO>t_Z?!l7tJO z@@jiNU)5WclIt(DDcJ}6*k&s(y^MO^uk!J-Vejcl94s^(cZt!^@x_IWs@|$O<*VlU zdiL^(oM9vWmUpJ-!jA7je`WZz8Nqxe92 zKF+@Z`S=gb@7jAk2m&G?SC`q2W8*Y1g5Wq*R6L&HPFXZY@zm7L)p=o@P;K?g!KZGY{OZ$0zt9)6wr z-h5d$-;ujYh|kDbJXzM~PriOg&bIR>FUM=sgk&$LJ>8DyZ{YJM<{b@XaUv(>w#hc`vdEN;{nG5jtANTtOwSE_6E)mtOwSE8}$&zcL4a+$k~nA zjg>P%hy8*5!43Yf&~aP&SrhMnYL-zKo`hw_a+g|GzTuwyyavSy4f$CyymVrruT(8- zs&M&jHD4Dl1JTR4R{t_~V$yb-_>D26%j?~vmg&{GY`(c4;QaKm;=0?i^}*!CdEzrL zx-acEX`ajGm-Bx5GM>QiGJf(_XB*A0{7R1zIHZ^Dw(qc7wz2r!+*)Q==rTQ04k!O)Y*~Qq!SyX^ z0sqcbe+Y`85cr}&tIbt2%=G+U+5>4b)MBnr$9-p?k@4;|x=f$$@#Z(DmsyJjpv>A? zte!?&^3$tD^WZDQ=YLIG9!HsT6YyZp>m#(k=(XrY`_oXBGn^KyZ-iRvZR20{ox94! z>GJ!3|K5+60`Xm=RwJ6Hi>mqndL{_-#k>$zjtkRu)85ytG;^MEwiS-0}}F CPY9v_ diff --git a/addons/weather/UI/wind11.paa b/addons/weather/UI/wind11.paa deleted file mode 100644 index 469cdedadab329aa760cbad3b769c6b5904c6717..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPe{2&~9Dgj+j*+cnKbVN!8defS0U_q1%-J=VZqxB2f{V$V$u`U&uDAahe=x>0 z$S`EnB2i;W6V&jB31DzX2#ErsY-xgsWOQx9gl;aftuv{cOgf(L_4d8eOHAO8E!^w( zC70YMce#7t&*%H&-n)1A5Ur?iY+YYb<47ljM5ED%s_297Cf99KB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44ypOy3;(1xY6?N4)k{Tx0O$p1B}Hjq`1&3m{EuJiwQTz~$fy0A2L zY}|k5;Jv%4v`=YlbdR2e`^~>kH#4<$xb9~WK?cd-)1oF_w@WHnHn}Uh3fC)*?<>t( Xw592~mCiCM=kp1r`TVM8T@v~azUm9A diff --git a/addons/weather/UI/wind2.paa b/addons/weather/UI/wind2.paa deleted file mode 100644 index 585944af45e23b600ba751e17ac21373deac33ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPYiJx*6uzmuNvcT`LeeC*+a^tlXpKUlt75}u4Q^aXwKi46l7QLRN7~K$t5CFT zY)S<|Ypey8rokfkL#5kPE(k(upry3Y=8v%HYE$zfX&TeAArQNp@!Xl7I}Z>QBy}cd zU}3(UVdmcNeCIJUXU476)%myA*1h6)F~*X~WTuK=^=}bafkogte|k4fK>naJK>k4fpsRuM1Nnn9{h{crx21x=o82t4F%eadU$dSMm~R33}3z9 zj9!4aVRG^otosmG%*H(NZ*!%d$o}@SztvtZ?Ya<|;UQ_yy=h@-Jw9BTR&FawbR6y9 zILSSOQTPiMaV%e-h!>tXV(ak8Dx6Qn zE#GaQaz#K@5A|1hbs{g-jd(rf4^;rjhtvFF6A!fQfDnN5TQj8$DNSu1h)c)IQ@aF! zMa=!NA7SUtbTMM5@j>&^7(n|L4Bd!qFw~z9&nZdeazxY=svcI398UKucLY@Nx^B=% zPx>5U;?vBh-T4Tx;D?oPNrCn)8cxrQd3VeBQT}^$PMObJ!0k`P&Gp8bxI8bE&R zt_SP*9~j`xs|@*M?X=RH%8cy5`Mz~CFV$Z1?%o_%#O5o^DG%Svd;D1%E^4lj;R1 zF8cL)y zm-e9^mbFm5AvAz|*j*3S@lUYjouh_&bmLjLeuWf+^Q}EEii>Um)qL{EAlxtStd{Y` zdOX4!1IU-%`KXv_YQ4`;kGj}%@H|AnezE)fX#CF7E7_CmDHw1{{3Sh;o=MN-&lJzJ z>ko>D6b~sLQaq%1NbwMJ0mTF7#Df~~4S;-US#oo7b14Q`Aw7^DNDqv;pXVWCn@HBR zW50em5t&8*$eiZYKSci!P{o*{*j(^UwV&d z_E-5>{xn86`=}!;N_8jaxa74zNoDlF6^T_R(!;n9x;k6y+c#}boja3sn)!t6iFU?0| z;9lvqjFmAaJ~XH;_i7mbxAPai2Wcd*dkXm|n-FPb@!l5kThiVfeC4qrcv8O2Q2P^< zNxA#JkmFnAGReKyoOW`4E6>@ikFUIrcwh0{HV%xWL99|s+li~T}tbXI>1Jq50 zd|2&~FKz{jZ;fipU+wmH+w%|e@Y9Buus&hIQtfZigmvG*ql Cks3e% diff --git a/addons/weather/UI/wind3.paa b/addons/weather/UI/wind3.paa deleted file mode 100644 index 16b823a9f3086d54b3d7722d2d5574f100140ac9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeI4KWGzC9LHZvj1^NTG1Z|){F5O#h>8X+4vB??la{NriXcKrp@TMd)hQK=ZW;nE z#Wb#B9dyXxq)P)G6cIw8i&7L3gb;O$oWI{)-g}oUO;BtazA0($+q)$1ec$)mQ^tS!2*PQ=FJto!K7dMX|_qqMz1*ZZ{bU{Z)j(?UGH zB*X??+rKREV?@>Q{Dex-1~mLY9<&4C0X*n5pgw{J@BkjP1KQ@Sq*&6&^go$c2oYNA_p9R7|hmd*YQ^_85A5 z@W1yWjbAZ+M2^>)r=%lGEbad%AGV6=m5E$P>f|@?4|`{0f1sMF?#%qO|74H-DE&5S z&<%e?iyxz}$X`(}u|bj*zTGPAd$u;eLQRs-f1+X)tkvsE2cPqvho9ws*=nip{-Ui+ zRrlu>X`^5F2fE3RsTY}gX=G0MD>ESd>^AKaMwaTm;{WJI>gI?mFM;>goBieFw&_o| z`HS{A4s>h&F+La{b^!U5Ge7cxJb(w(1Jnbj5~3cW9-Q@Sq)Nmxm~S2f&cJU%Pjccfj$$PG*5`kq6`fdC(4khu+}f zrL$~xj~vfQTGqI}x}=shjlV4pRtmqfa(~`FUN2+&-}-Ex+E>i0WwtVrvVEOuUvX`I z#@Z=-)LfaLtab`cPQd{*YKu z%{Jkd*d7Y=@j>7zsd diff --git a/addons/weather/UI/wind4.paa b/addons/weather/UI/wind4.paa deleted file mode 100644 index a5bd119889a087e37f898a217fb98eea8b1e4e0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPZD>w2; zIyRURD4Vd+?%$w4)RtXT7|8~k5{gw}qngzX7qxz@I6FqAA9v@y*Y}*8gFn_;+`Y?t zA@n}I>Fqhs^FHr;PVPBz=?x9_q4f>h>hl<5BO@dE27a?X2w3L_;D-8*0l+!@1^A6X zV3VJpxAE6ue)7p?#yUcbecsI2Z~XPok2bi6U%Vgwp#c1ZF!4e0AQ>P(kRN0;P<|vo zkRQkok^%Aq`9Vel)d%te`GNc(86ZE9A7nI8eIP$P+7HWEW30L{mWTYf4BTFg7-NX= zqxo|hKd=0xMN(S(Bv6ngT3B?&foxIr}Zz}+gtk;=-ZMO`lZ@tOg;c) z#&6XyKWUAACvd!V_GSJjh_jtPyZ8Ua9?&`))SG*W`sgXi_J zM32;W1=|4mUcBG#{mr)aRV($_e@ct&2wVj@jpt=YM-8wOagE*>3mtO{|GxC~0f-NQ zvyDHe^|$sL@UyJPJMKLM5B09R%ZqcrU)1CE-xt@BzRsD?%>4-TmG!u(Pur880QZ`H zUULS{#uA7t@3eMYK0*FPKJ4!2nTIp$@ybhDWa$vJ-qcrLUJ6~PL;TEjeXQ@G)c19& z$A-knkKOe4DD~KPUyGC*Qzld2<{yoE92f2H()IX}7sPs&(ljs5RF4H8|Fynl--2Iv zzl?ealZ!smY;`&(!PD;qn)#`eG4z~v*H3VA6|Y<*Y{h- z*Cls0)mrm+b&%%IpfK`h_jvaPd|~VOs%RDI=Oq2?9$(ZxlL4pX1JaB10tP5vab!#J zK=D9+pnO32z|4e{4=Eo~KBRm|`H=FVWPtqeWc=WV?*Q-!-ih`nLpu^qd=uXo3-FWT z;orr>)5>GU90UJHf8I5B9G{-y8FE$Yp7>KX%q*v^>R+ z_c%@$Z4vox`^CW3IA1x7{Vh4-tYx&%Dg9%&8FM#%2Hi21t(5nJAEQ?gmz{O?wvKs9 zf9L<~3#ZThvK9MRoaASg$NCj#db}yiV|}OPAGN*nS>sXbHVu!%@{QUb!X^V4zr+Xe z0SshoJS<=f7=tewG>>ehVY>Ujus3sO`_HgP`Xv^LAUaPD*2l%EAUpN>4|D5i>l1Uy}h`mz`Z}esu)c^nh diff --git a/addons/weather/UI/wind5.paa b/addons/weather/UI/wind5.paa deleted file mode 100644 index 43398e2960c4e1c889cd1f2644f81b9baacac3ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPeN0R?bm zSk#~qqb`w1qEX{tFm*3k)PSf!Le$_8%IYSrj7i2?O5G^h?s@Mk=hihbtRNOHr%99d zOWSwv{r%24_ndp*ZM8xr_A@Ng7sIB4eMW}Y&^N;m8I2_d zdfiCh$LPgtrG&gyMo8-cLR|EHzqrm^G-rk}S@qiYL(?R);;5lH!)E;uaOxdvvs24$Ap}H+*idA33?+2^b;< zVlnJPGoY{X4SBACo`v7ZS9XUpe4uV(ZQ- zX~_bN`irGM`N*IR_H{COmG!c;iH2bR#~BX5sJB>pZ}&=;BQ(T=zNG`RbaM9&1J)cq zvEE5T0$|jCW$V8#BA>hSbdTrSpKVOu(E9lM@)Sue#r1LEW6t0?KPwz>zCiEeOSLSj)9NG@*V5nkFogv?BU%oo_)^i>o+naU)i9YS_7ZQy1&?dh=GObksL9f z-|z5$CI{Qt?Uele(-}WqkDuju%#i?eEQ?(AqF7+As@&GV*u>|Dgm?yvKxEFLH@qA`;Gm=Zrk4!vCWa^t*tt0`=uYopDFrdDi;WS4o}Os z?NzSl>VS zTeoMgt%HyE9I;KWreiZ}AGEW4RoHwb*7k+%hZy*;;)#yv=zo_0tIMYBgAOfpn1eK} z&i?wFZ43QVJ)&&bdH&$#t`9Q)x3E(*EFIcfTk$iD zSN+V=PU~r7%IO^!wC5)Sh1+d$*?^O)+drDKHIT|6kr%?#mWoDH#^>#lc`(sD0=*Bh^*8&^1DF5+ diff --git a/addons/weather/UI/wind6.paa b/addons/weather/UI/wind6.paa deleted file mode 100644 index 3bd9a9c6764fd0d669eee58ca91c25c67d5e1e01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPO-K|`9RC}u*}+d1D$G(`WC;Q*6w<<71J}iBgEXQ;WS%^zbg_sQKOnqi7}CLy zE`g^?!(M`yAm{@MJGy!(+90GLr9*^k)Blb8p6fu6&vqVEpL?g{a zaX$Wi>yh6P(4UtLYQQJJs0Z}0UIF+4eppun@)3T3AGV_(${&jMGSTr>>G#YdG5Xv} z%qpz<1ng3MR|j%G^RD^5-o3Pwca4(*00#dm3*=wu!6kZt|7}?tt7q^J{xSZWJD$P+ z@IU+y|MLZqZ3N8!%*q4gzgc|Sy-k_FgMaXk@gL(q#(y)P_dxz5|B?U5f8;;%UnU{u z|7MK`82`=U+wLvq|EAvWou=@h_s!4))&CQ*sxkZFpXB&|W3e_dF8|4!luBldM&1tG zoL4w0A9Jsloc`Hnco&85_`-ue#pj;yzdl$i0}|SNtEXBNKD^jpyfAfWL1FN}Rsq-4 zBmO$?_xn8k{9oC$Wz||g52*eXP{UxVUckS*_zyho>Wqud8pZdqkKL=YwTU@}!MD5k zcJjIJqG&A=?K5v_U}=56kc&W}fpS#}%cWhoEuy1vKrmWX$alO(tmqyOL^`iK8@ zz9IjR{|1eJb+1I*@XIR+rT@Ki_oA^c=DdcWd9kbGM^(p)>VNe&EAe8$oa;Y&Mmu`Q zqp$aJXYNPmCb0~y^q}S-z*{pPEuj)(IjU{Dl)W;taT?h+Hc`AVS*-8wq`N;6$24w? z8v1;^Z&m$FZ=c>#)@91_t9r+&@rkdouUz4D^B?{sT8Bl8)>}nfK0T77ak|_8-`}4v zmjdOxM%Ok~#!^4uF=eMITo+-?PE*+Vc_;QeY!ca|P5f;0qLlU{*Cui{)4uo8#+$x$ zE2BdG#=rgkY|56)qJ>`3UX-#(<@1Z2)O7Lgx6?R{Ozh=|2C5vq57{eG{$E4@VLOjpa@YjVlG zwEf9LQVy!HUc9oWKgEe~j_upe)c6lo1c)LkIzk2aJah8!$g& zJYYOvJcJOyc(^k0aJQScdHGj&BfeJ#Utn;o;G4@8zn)e6Mi%I^W#WL2yb7wj^H8RQTXrF@XnM(c%+H2HhP zKeG788lGvS=v=n5Di{2pMVj6lIo_fJIo9+=eIm=pJ9xgzL_;3@opX^E2Xu-6c|#YU z=wQgVPf$;uu&6I2QSl}3QzmyM*-_v69lQdjk{0k4Y^TpyGaEMO(dGP;@ z&F!MwB|HwY+U?i6eaqht?;oESBkz!T-yh)r&EH`E$T$LcsGcu}hmyu?m%R`6rjvx0 zlf`egfvm@RQKA6gp*B7wEBePxCj;$dz#*?EP6EutryKlE`VIh@SpcAa!XY4IiF{_)uH^yOcfG&-}bSpWayn z`;GgxwarBTbojQL`^dpFJw-Mv;BhJZ)b@Sy)VEcBbLB3uKkm1V5^s~(3$ohmRobId z%%2&ACWq>3`LW*A!>pe8s7EV!te^eWe!*&&^TX!34Z@&H{8B6SuT}6N{cPan-PRq4 z!2TqS)l(@7JWN~>ee6B-ngnG$p&Ud2_=0%+Gai{-CdaWC4F*543R~U)Z*x1h%1`?) ziEM#Uv{5i2rP~^p|sjN^Pg99 z5?)NV>G>TpO-+{>wgv^P#t*vlhi}>G0sStQW^pfBw=SV3{oVf!oI!du>U!F!*T!YS k&y;(=;}mMG+Sqw!cyDM}9nGk0X*G`yQotEtn4q?Q0xmTZ$N&HU diff --git a/addons/weather/UI/wind8.paa b/addons/weather/UI/wind8.paa deleted file mode 100644 index e51ad530c5348a0ed13ec379da905ec6fbd2c9cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22016 zcmeHPZD?Cn7(SbA8Z7D3iA&eC(z3d(l+oc>plr~jgT$)Ek8V~rDm1mWYTEo02aa^Q zt@uMTg(*m95%xn+v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?d00001 diff --git a/addons/weather/UI/wind_dot_ca.paa b/addons/weather/UI/wind_dot_ca.paa new file mode 100644 index 0000000000000000000000000000000000000000..8286ffab2da47e9c73942004e6de959eef473f61 GIT binary patch literal 22016 zcmeHP4QyN06}~U=Go>Q2L+ldQws4!I-9%Yhq#CgTaj29g5~Y@Ax2X^;jbSa2CJZ7C z)G_C0D`gUE3I*DdlCl+5@sMI5wI*#SDMRTGl(nhUrUW%9tuh*{IU#G)B(~qqx!3pk zN68!@KX&UY+0W zBQ3xO>0cBVud~4KTKK#SKmKGTR z?@RTgNZV}|!t^ow_JQrs2L5J>_d7XMUb|MvZS`#0QT9)YuL$}m>!Sq46i6bCGn1Sv zJdsbz2Qa{{Kaw5?h#_%#HuhZ^e3?qi>d$q%*B+s_2!XMjP<^dSTgvnW1~Nkl>z@hy z#Y)dsz4?h{lz*)#=+AB6vErEvfH#v@>eQJ~B$=LWeJ5LeogHbG2z}_!X$+a`u)kpX z0)1xm)bBq+^=Y$W(P>Fo-*n*5@cz|LD1U&rqd^@w2 zV}mKY89wZL2KCWdn^qp7?_Brq_aABXtFc{Ny-jsK$?%Im|KCeW-}&_TTN*5{6-8m= z#lCibpqW}Eu#xg_+RM!#-f`;Rc(HJ3vov1F{ckT>_jTU3dRPJzVzW*@UziO4*!8#0 z+xhg0vI6Gsi1&>)KaZnd)DtGI--M%M))zXj(Qv{yXhl9P!1rYFhsp4V_{FA2Jx}Fg zKKQ#RITn=*Vt786aPlWQKC{iAgQOoL;rXJm#(j5Bo3R^lgZ@CCA54aS7kT9^+kIIy z9)t6Pfw9zlE}{KD#=Zu|qUVcU1((T@s5n|O@@C^9BRyLeO8WlW4UCKKgDk} zUO{nB!%C}ah>u?^m(APIzhQp^`}Ut-%xR@_H_%&uD!noj!_4`d~-q=Nw;R zBqpLz%kvr7@7lD@^NftYRHu7ZxT75QSD2(pCvU31q6RDD*U*vnO>HI(!ePeJRqh9R z4jX%TKJ14^;os7BylZKij)`vwU(fAjYcpQKCY}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3!Tms~2BK3Uaj0f^IR}Kt->%GUSgT+<8kX~VX z3w!^>9pB>dx54WiJfrf{@gKyn2oc*vc`yJ{;i!D@mn@KAzEH6(9LCiyZUK7;Bu^Nh z@+*zYVf5Qi?|Pso95#M3C0a_NnP(OCND=r<` ze`uk+#vKv15?!$VJ*j$?>I?f@kr=zA-aJwcVP0k#KsO(ZpjY^uCvKI?TcN&)u#(jU z^Vi7NI^y%k1(-;l{QUWVs|n8v^JMrp{Ic0>;^Vl?-I{wp(y$KF_j$IiE`NtHEfA75 zVD4c5wx;g|66o6fyHO@d-)jLH%HQ3s!j%~iaD&xn>}K_a|E+?yr`2j%{-#x!Z?kC> z8Dq-ypuZXFo1SGz#@Hf%wlrFZ^&x+>J-4w3+tX?_YJH!%Vz{^}fcdBm$~V2TU(-$N z`|4i$Qssxh0Sm%p4fMkw=Ahd!eNK0KvGrvQ6b8;Y2cer}cx4Sh21XyTJ+(%wrFY@WK<(cK_Gzx*`OwRPKaHyT z%}>zXA@qo>0dS4Vigb<_rAu#xX&uE6^eGLi>)CD+TD|^cfjetQyPH>LiLS|w@NSpLmD2BYlgZJY2=qM!3mYO=q?pk-4zo|tiG28^CpoFtF%}zC-OKEubPJ#No=U7Q&;b;RGGnX3*lm7v@M+zta literal 0 HcmV?d00001 diff --git a/addons/weather/UI/wind12.paa b/addons/weather/UI/wind_noneCircle_ca.paa similarity index 100% rename from addons/weather/UI/wind12.paa rename to addons/weather/UI/wind_noneCircle_ca.paa diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index f5ef929ff2..a19e000332 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -14,6 +14,7 @@ GVAR(ACE_rain) = rain; "ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = ACE_time; }; "ACE_MISC_PARAMS" addPublicVariableEventHandler { if (!isServer) then { + TRACE_1("MISC PARAMS PVEH",ACE_MISC_PARAMS); if (GVAR(syncMisc)) then { 30 setLightnings (ACE_MISC_PARAMS select 0); 30 setRainbow (ACE_MISC_PARAMS select 1); @@ -27,10 +28,11 @@ GVAR(ACE_rain) = rain; }; }; +GVAR(WindInfo) = false; ["ACE3 Common", QGVAR(WindInfoKey), localize LSTRING(WindInfoKey), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Statement [] call FUNC(displayWindInfo); @@ -45,16 +47,16 @@ simulWeatherSync; ["SettingsInitialized",{ TRACE_1("SettingsInitialized",GVAR(syncRain)); - - //Create a 1 sec delay PFEH to update rain every frame: + + //Create a 0 sec delay PFEH to update rain every frame: if (GVAR(syncRain)) then { [{ 0 setRain GVAR(ACE_rain); }, 0, []] call CBA_fnc_addPerFrameHandler; }; - - //Create a 1 sec delay PFEH to update wind/rain/temp/humidity - + + //Create a 1 sec delay PFEH to update wind/rain/temp/humidity: + //If we don't sync rain, set next time to infinity GVAR(nextUpdateRain) = if (GVAR(syncRain)) then {0} else {1e99}; GVAR(nextUpdateTempAndHumidity) = 0; @@ -62,17 +64,17 @@ simulWeatherSync; BEGIN_COUNTER(weatherPFEH); [] call FUNC(updateWind); //Every 1 second - - if (ACE_time > GVAR(nextUpdateRain)) then { + + if (ACE_time >= GVAR(nextUpdateRain)) then { [] call FUNC(updateRain); //Every 2 seconds GVAR(nextUpdateRain) = 2 + ACE_time; }; - if (ACE_time > GVAR(nextUpdateTempAndHumidity)) then { + if (ACE_time >= GVAR(nextUpdateTempAndHumidity)) then { [] call FUNC(updateTemperature); //Every 20 seconds [] call FUNC(updateHumidity); //Every 20 seconds GVAR(nextUpdateTempAndHumidity) = 20 + ACE_time; }; - + END_COUNTER(weatherPFEH); }, 1, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index 3e084c7aa5..311fbd7bad 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -20,26 +20,31 @@ if (GVAR(WindInfo)) exitWith { GVAR(WindInfo) = false; - 0 cutText ["", "PLAIN"]; + (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; true }; -if (underwater ACE_player) exitWith { false }; -if (vehicle ACE_player != ACE_player) exitWith { false }; -2 cutText ["", "PLAIN"]; EGVAR(advanced_ballistics,Protractor) = false; 1 cutText ["", "PLAIN"]; GVAR(WindInfo) = true; + +TRACE_1("Starting Wind Info PFEH", GVAR(WindInfo)); + [{ - if ((!GVAR(WindInfo)) || {underwater ACE_player} || {vehicle ACE_player != ACE_player}) exitWith { + disableSerialization; + params ["", "_pfID"]; + + if ((!GVAR(WindInfo)) || {!([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith))}) exitWith { + TRACE_1("Ending Wind Info PFEH", GVAR(WindInfo)); GVAR(WindInfo) = false; - 0 cutText ["", "PLAIN"]; - [_this select 1] call CBA_fnc_removePerFrameHandler; + (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; + [_pfID] call CBA_fnc_removePerFrameHandler; }; - private _windIndex = 12; - private _windColor = [1, 1, 1, 1]; + //Keeps the display open: + (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutRsc ["RscWindIntuitive", "PLAIN", 1, false]; + private _windSpeed = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { // With wind gradient [eyePos ACE_player, true, true, true] call FUNC(calculateWindSpeed); @@ -47,35 +52,55 @@ GVAR(WindInfo) = true; // Without wind gradient [eyePos ACE_player, false, true, true] call FUNC(calculateWindSpeed); }; - - if (_windSpeed > 0.2) then { - private _playerDir = (ACE_player call CBA_fnc_headDir) select 0; - private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); - _windIndex = round(((_playerDir - _windDir + 360) % 360) / 30); - _windIndex = _windIndex % 12; - }; + + + private _playerDir = (ACE_player call CBA_fnc_headDir) select 0; + private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + _windDir = 30 * (round(((_playerDir - _windDir + 360) % 360) / 30)); // Color Codes from https://en.wikipedia.org/wiki/Beaufort_scale#Modern_scale - if (_windSpeed > 0.3) then { _windColor = [0.796, 1, 1, 1]; }; - if (_windSpeed > 1.5) then { _windColor = [0.596, 0.996, 0.796, 1]; }; - if (_windSpeed > 3.3) then { _windColor = [0.596, 0.996, 0.596, 1]; }; - if (_windSpeed > 5.4) then { _windColor = [0.6, 0.996, 0.4, 1]; }; - if (_windSpeed > 7.9) then { _windColor = [0.6, 0.996, 0.047, 1]; }; - if (_windSpeed > 10.7) then { _windColor = [0.8, 0.996, 0.059, 1]; }; - if (_windSpeed > 13.8) then { _windColor = [1, 0.996, 0.067, 1]; }; - if (_windSpeed > 17.1) then { _windColor = [1, 0.796, 0.051, 1]; }; - if (_windSpeed > 20.7) then { _windColor = [1, 0.596, 0.039, 1]; }; - if (_windSpeed > 24.4) then { _windColor = [1, 0.404, 0.031, 1]; }; - if (_windSpeed > 28.4) then { _windColor = [1, 0.22, 0.027, 1]; }; - if (_windSpeed > 32.6) then { _windColor = [1, 0.078, 0.027, 1]; }; + private _beaufortNumber = 0; + private _windColor = [1, 1, 1, 1]; + if (_windSpeed > 0.3) then { _windColor = [0.796, 1, 1, 1]; _beaufortNumber = 1; }; + if (_windSpeed > 1.5) then { _windColor = [0.596, 0.996, 0.796, 1]; _beaufortNumber = 2; }; + if (_windSpeed > 3.3) then { _windColor = [0.596, 0.996, 0.596, 1]; _beaufortNumber = 3; }; + if (_windSpeed > 5.4) then { _windColor = [0.6, 0.996, 0.4, 1]; _beaufortNumber = 4; }; + if (_windSpeed > 7.9) then { _windColor = [0.6, 0.996, 0.047, 1]; _beaufortNumber = 5; }; + if (_windSpeed > 10.7) then { _windColor = [0.8, 0.996, 0.059, 1]; _beaufortNumber = 6; }; + if (_windSpeed > 13.8) then { _windColor = [1, 0.996, 0.067, 1]; _beaufortNumber = 7; }; + if (_windSpeed > 17.1) then { _windColor = [1, 0.796, 0.051, 1]; _beaufortNumber = 8; }; + if (_windSpeed > 20.7) then { _windColor = [1, 0.596, 0.039, 1]; _beaufortNumber = 9; }; + if (_windSpeed > 24.4) then { _windColor = [1, 0.404, 0.031, 1]; _beaufortNumber = 10; }; + if (_windSpeed > 28.4) then { _windColor = [1, 0.22, 0.027, 1]; _beaufortNumber = 11; }; + if (_windSpeed > 32.6) then { _windColor = [1, 0.078, 0.027, 1]; _beaufortNumber = 12; }; - 0 cutRsc ["RscWindIntuitive", "PLAIN", 1, false]; - __ctrl ctrlSetScale 0.75; + TRACE_3("update display",_beaufortNumber,_windDir,_windSpeed); + __ctrl ctrlSetTextColor _windColor; + if (_beaufortNumber > 0) then { + __ctrl ctrlSetText QUOTE(PATHTOF(UI\wind_arrow_ca.paa)); + __ctrl ctrlSetAngle [_windDir, 0.5, 0.5]; + } else { + __ctrl ctrlSetText QUOTE(PATHTOF(UI\wind_noneCircle_ca.paa)); + }; __ctrl ctrlCommit 0; - __ctrl ctrlSetText format[QUOTE(PATHTOF(UI\wind%1.paa)), _windIndex]; - __ctrl ctrlSetTextColor _windColor; + //Update the beaufort balls: + (ctrlPosition __ctrl) params ["_ctrlX", "_ctrlY", "_ctrlWidth", "_ctrlHeight"]; + private _centerX = _ctrlX + _ctrlWidth / 2; + private _centerY = _ctrlY + _ctrlHeight / 2; + private _ballHeight = _ctrlHeight / 17; + private _ballWidth = _ballHeight * 3/4; + + for "_index" from 0 to (_beaufortNumber - 1) do { + private _ball = __dsp ctrlCreate ["RscPicture", _index]; + _ball ctrlSetText QUOTE(PATHTOF(UI\wind_dot_ca.paa)); + _ball ctrlSetTextColor [1,1,1,1]; + private _ballCenterX = _centerX - (_ballWidth / 2) + ((sin _windDir) * 0.013333) * (_index - 4.9) + ((cos _windDir) * 0.0125); + private _ballCenterY = _centerY - (_ballHeight / 2) - ((1 * cos _windDir) * 4/3*0.013333) * (_index - 4.9) + ((sin _windDir) * 0.0125); + _ball ctrlSetPosition [_ballCenterX, _ballCenterY, _ballWidth, _ballHeight]; + _ball ctrlCommit 0; + }; }, 0.5, []] call CBA_fnc_addPerFrameHandler;