ACE3/addons/spectator/functions/fnc_moduleSpectator.sqf
2015-07-16 15:49:02 +01:00

33 lines
942 B
Plaintext

/*
* Author: voiper
* Read spectator settings from module
*
* Arguments:
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_3(_logic,_units,_activated);
if !(_activated) exitWith {};
[_logic, QGVAR(enabled), "SpectatorEnabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(limitSide), "SpectatorPlayerSide"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(allowAI), "SpectatorAI"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(tracking), "SpectatorTracking"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(modulePos), "SpectatorPos"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(endMission), "SpectatorEnd"] call EFUNC(common,readSettingFromModule);
if (GVAR(modulePos)) then {
GVAR(startingPos) = getPosATL _logic;
GVAR(startingDir) = getDir _logic;
};