2015-05-08 16:30:28 +00:00
|
|
|
/*
|
|
|
|
* Author: Winter
|
|
|
|
* Initialises the view distance limiter module
|
2015-05-14 19:36:12 +00:00
|
|
|
*
|
2015-05-08 16:30:28 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: logic <OBJECT>
|
|
|
|
* 1: Synchronised Units <ARRAY>
|
|
|
|
* 2: Module Activated <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-05-14 19:36:12 +00:00
|
|
|
*
|
2015-05-08 16:30:28 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
if (!isServer) exitWith {};
|
|
|
|
|
2015-08-04 02:24:30 +00:00
|
|
|
params ["_logic", "_units", "_activated"];
|
2015-05-08 16:30:28 +00:00
|
|
|
|
|
|
|
if (!_activated) exitWith {
|
2015-05-08 16:41:32 +00:00
|
|
|
diag_log text "[ACE]: View Distance Limit Module is placed but NOT active.";
|
2015-05-08 16:30:28 +00:00
|
|
|
};
|
|
|
|
|
2015-05-14 19:36:12 +00:00
|
|
|
[_logic, QGVAR(enabled),"moduleViewDistanceEnabled"] call EFUNC(common,readSettingFromModule);
|
2015-05-09 16:42:02 +00:00
|
|
|
[_logic, QGVAR(limitViewDistance),"moduleViewDistanceLimit"] call EFUNC(common,readSettingFromModule);
|
2015-05-08 16:30:28 +00:00
|
|
|
|
2015-05-09 16:42:02 +00:00
|
|
|
diag_log format ["[ACE]: View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)];
|