ACE3/addons/viewdistance/XEH_clientInit.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

22 lines
672 B
Plaintext

#include "script_component.hpp"
if (!hasInterface) exitWith {};
["CBA_settingsInitialized", {
// if not enabled, then bugger off.
if !(GVAR(enabled)) exitWith {};
// Limit on load
[false] call FUNC(adaptViewDistance);
// Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle
// Also run when SettingsInitialized runs (not guaranteed)
["vehicle",{
[false] call FUNC(adaptViewDistance);
}] call CBA_fnc_addPlayerEventHandler;
["ACE_controlledUAV", {
[false] call FUNC(adaptViewDistance);
}] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;