2015-01-20 23:18:40 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2021-10-11 20:48:30 +00:00
|
|
|
["CBA_settingsInitialized", {
|
2017-11-10 14:44:15 +00:00
|
|
|
if (!GVAR(enabled)) exitWith {};
|
2016-01-05 07:39:29 +00:00
|
|
|
|
2017-11-14 13:43:29 +00:00
|
|
|
GVAR(temperatureShift) = random [-SD_TO_MIN_MAX(4), 0, SD_TO_MIN_MAX(4)]; // Gauss(0, 4)
|
|
|
|
GVAR(badWeatherShift) = random [-SD_TO_MIN_MAX(2) + 4, 4, 4 + SD_TO_MIN_MAX(2)]; // Gauss(4, 2)
|
|
|
|
GVAR(humidityShift) = random [-SD_TO_MIN_MAX(0.065), 0, SD_TO_MIN_MAX(0.065)]; // Gauss(0, 0.065)
|
2017-10-17 18:19:30 +00:00
|
|
|
|
2017-11-10 14:44:15 +00:00
|
|
|
if (GVAR(windSimulation)) then {
|
|
|
|
call FUNC(initWind);
|
|
|
|
[FUNC(updateWind), 1] call CBA_fnc_addPerFrameHandler;
|
2017-10-17 18:19:30 +00:00
|
|
|
};
|
2017-11-10 14:44:15 +00:00
|
|
|
[FUNC(updateWeather), GVAR(updateInterval)] call CBA_fnc_addPerFrameHandler;
|
|
|
|
|
2016-05-22 15:29:05 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|