ACE3/addons/weather/XEH_postServerInit.sqf
GhostIsSpooky 998f86f034
General - Move to CBA Settings (#8461)
* first pass

* second pass

* third pass

* final pass

* missing commas

* newlines

* switch to cba eventhandler

* newlines, formatting

* laser - movedToSQF

* add logging to ace_common_fnc_cbaSettings_loadFromConfig

* Update initSettings.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-10-11 15:48:30 -05:00

17 lines
652 B
Plaintext

#include "script_component.hpp"
["CBA_settingsInitialized", {
if (!GVAR(enabled)) exitWith {};
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)
if (GVAR(windSimulation)) then {
call FUNC(initWind);
[FUNC(updateWind), 1] call CBA_fnc_addPerFrameHandler;
};
[FUNC(updateWeather), GVAR(updateInterval)] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;