From b3d14987bccbe261177e1e5e20890a8ef1e31479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Wed, 21 Jan 2015 00:00:06 -0300 Subject: [PATCH] weather: sync misc. parameters: lightnings, rainbow, fog --- addons/weather/XEH_postInit.sqf | 5 +++++ addons/weather/functions/fnc_serverController.sqf | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 1b290ccbf1..d77dcb17f5 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -3,6 +3,11 @@ #include "script_component.hpp" "ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = time; }; "ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = time; }; +"ACE_MISC_PARAMS" addPublicVariableEventHandler { + 30 setLightnings (ACE_MISC_PARAMS select 0); + 30 setRainbow (ACE_MISC_PARAMS select 1); + 30 setFog (ACE_MISC_PARAMS select 2); +}; simulWeatherSync; _fnc_updateWind = { diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf index b917396515..46cc2a9102 100644 --- a/addons/weather/functions/fnc_serverController.sqf +++ b/addons/weather/functions/fnc_serverController.sqf @@ -79,6 +79,10 @@ if(GVAR(wind_period_count) > GVAR(wind_next_period)) then { publicVariable "ACE_WIND_PARAMS"; }; +// Sync misc. parameters +ACE_MISC_PARAMS = [lightnings, rainbow, fogParams]; +publicVariable "ACE_MISC_PARAMS"; + // @todo: Temperature simulation