ACE3/addons/viewdistance/functions/fnc_init.sqf
2015-05-09 10:41:55 +02:00

27 lines
569 B
Plaintext

/*
* Author: Winter
* Assigns the Event Handler which fires when a player adjusts their view distance in the menu
*
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ace_viewdistance_fnc_initViewDistance;
*
* Public: Yes
*/
#include "script_component.hpp"
if (!hasInterface) exitWith {};
// Set the EH which waits for the View Distance setting to be changed
["SettingChanged",{
if (_this select 0 == QGVAR(newViewDistance)) then {
[] call FUNC(changeViewDistance);
};
},true] call ace_common_fnc_addEventHandler;