ACE3/addons/winddeflection/functions/fnc_initModuleSettings.sqf
ulteq d8b461db91 Enabled wind deflection for grenades and vehicle gunners:
*Added a new module option to disable WD for vehicle gunners
*Fixed enabled setting not being initialized
2015-04-18 21:17:37 +02:00

31 lines
854 B
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>
*
* Public: No
*/
#include "script_component.hpp"
private ["_logic", "_units", "_activated"];
_logic = _this select 0;
_units = _this select 1;
_activated = _this select 2;
if !(_activated) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(vehicleEnabled), "vehicleEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule);
GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2;