Coding standards

This commit is contained in:
SilentSpike 2015-07-05 00:17:15 +01:00
parent 83e5309654
commit 6596bbdb0a
2 changed files with 11 additions and 7 deletions

View File

@ -6,7 +6,7 @@
// Run spectator framework if enabled
["SettingsInitialized", {
if !GVAR(enabled) exitWith {};
if !(GVAR(enabled)) exitWith {};
//check if respawn is set up properly
_fail = if (getNumber (missionConfigFile >> "respawn") != 3 && getText (missionConfigFile >> "respawn") != "Base") then {true} else {false};
@ -28,7 +28,7 @@
if !(hasInterface) exitWith {};
if GVAR(tracking) then {
if (GVAR(tracking)) then {
[FUNC(checkUnits), 2] call CBA_fnc_addPerFrameHandler;
[FUNC(trackUnits), 20] call CBA_fnc_addPerFrameHandler;
};

View File

@ -1,12 +1,16 @@
/*
* Author: esteldunedain
* Initializes the addon module.
* Author: voiper
* Read spectator settings from module
*
* Arguments:
* Whatever the module provides.
* 0: The module logic <LOGIC>
* 1: units <ARRAY>
* 2: activated <BOOL>
*
* Return Value:
* None
* None <NIL>
*
* Public: No
*/
#include "script_component.hpp"
@ -22,7 +26,7 @@ if !(_activated) exitWith {};
[_logic, QGVAR(modulePos), "SpectatorPos"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(endMission), "SpectatorEnd"] call EFUNC(common,readSettingFromModule);
if GVAR(modulePos) then {
if (GVAR(modulePos)) then {
GVAR(startingPos) = getPosATL _logic;
GVAR(startingDir) = getDir _logic;
};