ACE3/addons/weather/functions/fnc_initModuleSettings.sqf
jonpas 856ffb5579 Remove rain, lightnings and wind sync (#5622)
* Move ACE Weather rain simulation to server and remove sync (synced correctly by vanilla from server)

* Remove lightnings sync (synced correctly by vanilla, ACE3 doesn't have own lightnings probability)

* Cleanup rain and lightning settings, strings, comments

* Set wind only on server (correctly synced in vanilla, gusts and waves still need manual sync)
2017-10-17 20:19:30 +02:00

39 lines
1.2 KiB
Plaintext

/*
* Author: Glowbal, Ruthberg
* Module for adjusting the wind deflection settings
*
* Arguments:
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None <NIL>
*
* Example:
* [module, [], true] call ace_weather_fnc_initModuleSettings
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
if !(_activated) exitWith {};
// Control server side weather propagation
[_logic, QGVAR(enableServerController), "enableServerController"] call EFUNC(common,readSettingFromModule);
// Overrides the default weather (editor, mission settings) with ACE weather (map based)
[_logic, QGVAR(useACEWeather), "useACEWeather"] call EFUNC(common,readSettingFromModule);
// Control client side weather effects
[_logic, QGVAR(syncWind), "syncWind"] call EFUNC(common,readSettingFromModule); // Wind, Gusts, Waves
[_logic, QGVAR(syncMisc), "syncMisc"] call EFUNC(common,readSettingFromModule); // Rainbow, Fog
// Server weather update interval
[_logic, QGVAR(serverUpdateInterval), "serverUpdateInterval"] call EFUNC(common,readSettingFromModule);
GVAR(serverUpdateInterval) = 1 max GVAR(serverUpdateInterval) min 600;