2015-04-17 04:44:38 +00:00
|
|
|
/*
|
2015-04-27 10:28:56 +00:00
|
|
|
* Author: Ruthberg
|
2015-04-20 11:54:22 +00:00
|
|
|
*
|
2015-04-27 10:28:56 +00:00
|
|
|
* Gather weather parameters and broadcast them to the clients
|
2015-04-17 04:44:38 +00:00
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* None
|
|
|
|
*/
|
2015-01-20 23:18:40 +00:00
|
|
|
#include "script_component.hpp"
|
2015-04-21 18:20:05 +00:00
|
|
|
|
2015-04-24 08:46:33 +00:00
|
|
|
if (!GVAR(enableServerController)) exitWith {};
|
|
|
|
|
2015-04-27 10:28:56 +00:00
|
|
|
if (GVAR(useACEWeather)) then {
|
|
|
|
// Use location based real world weather data
|
|
|
|
[] call FUNC(updateAceWeather);
|
|
|
|
} else {
|
|
|
|
// Simply replicate the server weather on the clients
|
|
|
|
if (GVAR(syncRain)) then {
|
|
|
|
ACE_RAIN_PARAMS = [rain, rain, GVAR(serverUpdateInterval)];
|
|
|
|
publicVariable "ACE_RAIN_PARAMS";
|
2015-04-22 10:56:07 +00:00
|
|
|
};
|
2015-04-27 10:28:56 +00:00
|
|
|
if (GVAR(syncWind)) then {
|
|
|
|
ACE_WIND_PARAMS = [wind call CBA_fnc_vectDir, 0, wind, 0, GVAR(serverUpdateInterval)];
|
|
|
|
publicVariable "ACE_WIND_PARAMS";
|
2015-04-22 10:56:07 +00:00
|
|
|
};
|
2015-04-27 10:28:56 +00:00
|
|
|
if (GVAR(syncMisc)) then {
|
|
|
|
ACE_MISC_PARAMS = [lightnings, rainbow, fogParams, GVAR(temperatureShift), GVAR(badWeatherShift), GVAR(humidityShift)];
|
|
|
|
publicVariable "ACE_MISC_PARAMS";
|
2015-04-23 09:54:24 +00:00
|
|
|
};
|
2015-01-20 23:18:40 +00:00
|
|
|
};
|