From 27610b78e1f1a88db453144f8cbd7580dda1df0c Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sun, 5 Jul 2015 00:10:01 +0100 Subject: [PATCH] Blank space cleanup --- addons/spectator/XEH_preInit.sqf | 2 +- addons/spectator/functions/fnc_checkUnits.sqf | 10 +++---- addons/spectator/functions/fnc_compass.sqf | 10 +++---- addons/spectator/functions/fnc_crosshair.sqf | 2 +- addons/spectator/functions/fnc_draw3D.sqf | 2 +- .../spectator/functions/fnc_drawMines2D.sqf | 4 +-- .../spectator/functions/fnc_drawMines3D.sqf | 14 +++++----- .../spectator/functions/fnc_drawTracks2D.sqf | 12 ++++----- .../spectator/functions/fnc_drawUnits2D.sqf | 4 +-- .../spectator/functions/fnc_drawUnits3D.sqf | 10 +++---- addons/spectator/functions/fnc_killed.sqf | 4 +-- .../functions/fnc_moduleSpectator.sqf | 12 ++++----- addons/spectator/functions/fnc_overlay.sqf | 26 +++++++++---------- addons/spectator/functions/fnc_respawn.sqf | 2 +- addons/spectator/functions/fnc_sideColour.sqf | 8 +++--- addons/spectator/functions/fnc_status.sqf | 2 +- addons/spectator/functions/fnc_trackUnits.sqf | 10 +++---- addons/spectator/functions/fnc_unitInfo.sqf | 2 +- addons/spectator/functions/fnc_unitSide.sqf | 2 +- addons/spectator/functions/fnc_unitVar.sqf | 6 ++--- 20 files changed, 72 insertions(+), 72 deletions(-) diff --git a/addons/spectator/XEH_preInit.sqf b/addons/spectator/XEH_preInit.sqf index b6187efa6a..45117a2a8b 100644 --- a/addons/spectator/XEH_preInit.sqf +++ b/addons/spectator/XEH_preInit.sqf @@ -26,4 +26,4 @@ PREP(unitInfo); PREP(unitSide); PREP(unitVar); -ADDON = true; \ No newline at end of file +ADDON = true; diff --git a/addons/spectator/functions/fnc_checkUnits.sqf b/addons/spectator/functions/fnc_checkUnits.sqf index 5d62aeed12..55935ccefb 100644 --- a/addons/spectator/functions/fnc_checkUnits.sqf +++ b/addons/spectator/functions/fnc_checkUnits.sqf @@ -4,16 +4,16 @@ Description: Compile array of units to spectate. - + Arguments: None. - + Example: call ace_spectator_fnc_checkUnits; Return Value: None - + Public: No */ @@ -32,6 +32,6 @@ GVAR(units) = []; _x addEventHandler ["Respawn", {_this call FUNC(respawn)}]; _x setVariable [QGVAR(listed), true]; }; - + if ([_x] call FUNC(canSpectateUnit)) then {GVAR(units) pushback _x}; -} forEach _units; \ No newline at end of file +} forEach _units; diff --git a/addons/spectator/functions/fnc_compass.sqf b/addons/spectator/functions/fnc_compass.sqf index 4120cd996f..4fd08044ee 100644 --- a/addons/spectator/functions/fnc_compass.sqf +++ b/addons/spectator/functions/fnc_compass.sqf @@ -4,19 +4,19 @@ Description: Orient and set compass. - + Arguments: 0: Compass - + Example: [display] call ace_spectator_fnc_compass; Return Value: None - + Public: No -*/ +*/ #include "script_component.hpp" @@ -56,4 +56,4 @@ _qOrder = switch (true) do { { _x ctrlSetPosition (_positions select _forEachIndex); _x ctrlCommit 0; -} forEach _qOrder; \ No newline at end of file +} forEach _qOrder; diff --git a/addons/spectator/functions/fnc_crosshair.sqf b/addons/spectator/functions/fnc_crosshair.sqf index 80a12cd668..96b2f8e8d8 100644 --- a/addons/spectator/functions/fnc_crosshair.sqf +++ b/addons/spectator/functions/fnc_crosshair.sqf @@ -26,4 +26,4 @@ if (!isNull _xhair) then { if (!isNull GVAR(attach)) then {[1,1,0,0.8]} else {[1,1,1,0.8]}; }; (_xhair displayCtrl 0) ctrlSetTextColor _colour; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_draw3D.sqf b/addons/spectator/functions/fnc_draw3D.sqf index 26eb319f73..f4504e8487 100644 --- a/addons/spectator/functions/fnc_draw3D.sqf +++ b/addons/spectator/functions/fnc_draw3D.sqf @@ -31,4 +31,4 @@ if (!isNull _status) then {[_status] call FUNC(status)}; if (GVAR(markers) > 0) then { call FUNC(drawMines3D); call FUNC(drawUnits3D); -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_drawMines2D.sqf b/addons/spectator/functions/fnc_drawMines2D.sqf index c77c589529..77cfd1c032 100644 --- a/addons/spectator/functions/fnc_drawMines2D.sqf +++ b/addons/spectator/functions/fnc_drawMines2D.sqf @@ -1,7 +1,7 @@ /* Author: voiper - + Description: Draw mines on spectator map. @@ -40,4 +40,4 @@ _showText = (GVAR(markers) > 1); _name = getText (configFile >> "CfgMagazines" >> _magName >> "displayName"); }; _map drawIcon [TEXTURE, [1,0.5,0,1], getPos _x, _iconSize, _iconSize, getDir _x, _name, 1, _textSize, "PuristaMedium"]; -} forEach allMines; \ No newline at end of file +} forEach allMines; diff --git a/addons/spectator/functions/fnc_drawMines3D.sqf b/addons/spectator/functions/fnc_drawMines3D.sqf index 7183db574f..bcf5d6e5e7 100644 --- a/addons/spectator/functions/fnc_drawMines3D.sqf +++ b/addons/spectator/functions/fnc_drawMines3D.sqf @@ -1,7 +1,7 @@ /* Author: voiper - + Description: Draw mines in 3D. @@ -33,23 +33,23 @@ _showText = (GVAR(markers) > 1); { _pos = getPos _x; _dist = (_cam distance _pos) + 0.1; - + if (_dist < 2000) then { - + _distScaled = SCALE / sqrt(_dist); _iconScale = 300 * _distScaled; //_iconSize = (20 * _size) max _scale min _min; _iconSize = _iconScale max ICONMAX min ICONMIN; _textSize = 0; - + if (_showText) then { _textScale = 10 * _distScaled; _textSize = _textScale max TEXTMAX min TEXTMIN; }; - + _magName = getText (configFile >> "CfgAmmo" >> (typeOf _x) >> "defaultMagazine"); _name = getText (configFile >> "CfgMagazines" >> _magName >> "displayName"); - + drawIcon3D [TEXTURE, [1,0.5,0,1], _pos, _iconSize, _iconSize, 0, _name, 1, _textSize, "PuristaMedium"]; }; -} forEach allMines; \ No newline at end of file +} forEach allMines; diff --git a/addons/spectator/functions/fnc_drawTracks2D.sqf b/addons/spectator/functions/fnc_drawTracks2D.sqf index 32b6d58ae8..f5e3695056 100644 --- a/addons/spectator/functions/fnc_drawTracks2D.sqf +++ b/addons/spectator/functions/fnc_drawTracks2D.sqf @@ -26,12 +26,12 @@ _zoom = _this select 1; { _unit = _x select 0; - + _info = [_unit] call FUNC(unitInfo); _colour = _info select 2; - + if (_unit == GVAR(unit)) then {_colour = [1,1,0,_colour select 3]}; - + _positions = _x select 1; _count = count _positions; _step = floor (10 * _zoom) min 3 max 1; @@ -47,10 +47,10 @@ _zoom = _this select 1; }; }; }; - + //((_count - _step + _count mod _step) max 0) if (alive _unit) then { _map drawLine [_positions select _lastIndex, getPosVisual _unit, _colour]; }; - -} forEach GVAR(trackingArray); \ No newline at end of file + +} forEach GVAR(trackingArray); diff --git a/addons/spectator/functions/fnc_drawUnits2D.sqf b/addons/spectator/functions/fnc_drawUnits2D.sqf index 858b418c2f..d6c1ed59f5 100644 --- a/addons/spectator/functions/fnc_drawUnits2D.sqf +++ b/addons/spectator/functions/fnc_drawUnits2D.sqf @@ -71,11 +71,11 @@ _textSize = (0.25 * _size) max (SCALE / 2) min (SCALE / 1.5); if (_isTarget) exitWith { _topIcon = [_icon, [1,1,0,1], _pos, _iconSize, _iconSize, _dir, _iconText, 1, _textSize, "PuristaBold", "RIGHT"]; }; - + _map drawIcon [_icon, _colour, _pos, _iconSize, _iconSize, _dir, _iconText, 1, _textSize, "PuristaMedium", "RIGHT"] }; } forEach GVAR(units); if (count _topIcon > 0) then { _map drawIcon _topIcon; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_drawUnits3D.sqf b/addons/spectator/functions/fnc_drawUnits3D.sqf index 709e7d8fff..785421e5b2 100644 --- a/addons/spectator/functions/fnc_drawUnits3D.sqf +++ b/addons/spectator/functions/fnc_drawUnits3D.sqf @@ -29,7 +29,7 @@ _cam = GVAR(cam); _showText = (GVAR(markers) > 1); _topIcon = []; - + { _unit = _x; @@ -37,11 +37,11 @@ _topIcon = []; _veh = vehicle _unit; _inVeh = (_veh != _unit); _cmdr = if (_inVeh && (_unit == ((crew _veh) select 0))) then {true} else {false}; - + _obj = if (_inVeh && _cmdr) then {_veh} else {_unit}; _pos = if (surfaceIsWater getPos _obj) then {getPosASLVisual _obj} else {getPosATLVisual _obj}; _dist = (_cam distance _pos) + 0.1; - + _isTarget = (_unit == GVAR(unit)); //exit if too far @@ -83,7 +83,7 @@ _topIcon = []; if (GVAR(markers) > 2) then { _text = _text + " [" + str ceil(_dist) + "]"; }; - + if (_isTarget) exitWith { _topIcon = [_icon, [1,1,0,1], _pos, _iconSize, _iconSize, 0, _text, 2, _textSize, "PuristaBold", "CENTER", true]; }; @@ -94,4 +94,4 @@ _topIcon = []; if ((count _topIcon > 0) && GVAR(cameraOn)) then { drawIcon3D _topIcon; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_killed.sqf b/addons/spectator/functions/fnc_killed.sqf index 4774476be4..01bd09fdf4 100644 --- a/addons/spectator/functions/fnc_killed.sqf +++ b/addons/spectator/functions/fnc_killed.sqf @@ -32,7 +32,7 @@ if (!isNull _killer) then { if (GVAR(markers) > 2 && !difficultyEnabled "deathMessages") then { _nameUnit = name _unit; _nameKiller = name _killer; - + _text = if (_killer == _unit) then { format ["%1 died", _nameUnit] } else { @@ -62,4 +62,4 @@ if (!isNil QGVAR(trackingArray)) then { _tracks pushBack _pos; _unitArray set [1, _tracks]; GVAR(trackingArray) set [_index, _unitArray]; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_moduleSpectator.sqf b/addons/spectator/functions/fnc_moduleSpectator.sqf index a371327b23..5a160315ea 100644 --- a/addons/spectator/functions/fnc_moduleSpectator.sqf +++ b/addons/spectator/functions/fnc_moduleSpectator.sqf @@ -15,14 +15,14 @@ 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(AI), "SpectatorAI"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(enabled), "SpectatorEnabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(limitSide), "SpectatorPlayerSide"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(AI), "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); +[_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; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_overlay.sqf b/addons/spectator/functions/fnc_overlay.sqf index d998b9a3b2..7c29bf5202 100644 --- a/addons/spectator/functions/fnc_overlay.sqf +++ b/addons/spectator/functions/fnc_overlay.sqf @@ -25,23 +25,23 @@ _mode = _this select 0; _this = _this select 1; switch _mode do { - + case "Init": { - + _display = _this select 0; _ctrl = _display displayCtrl 0; _count = _ctrl tvCount []; for "_i" from 0 to _count do { _ctrl tvDelete [_x]; }; - + _ctrl tvAdd [[], "Blufor"]; _ctrl tvAdd [[], "Opfor"]; _ctrl tvAdd [[], "Independent"]; _ctrl tvAdd [[], "Civilian"]; - + _unitList = []; - + { _units = units _x; private ["_groupNum"]; @@ -56,15 +56,15 @@ switch _mode do { case INDEPENDENT: {2}; case CIVILIAN: {3}; }; - + _icon = getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "Icon"); _picture = "\a3\ui_f\data\map\VehicleIcons\" + _icon + "_ca.paa"; _treeIndex = []; _unitList pushBack _x; - + _savedUnit = GVAR(savedUnits) find _x; if (_savedUnit > -1) then {_text = _text + " (#" + str (_savedUnit + 1) + ")"}; - + if (_forEachIndex == 0) then { _groupNum = _ctrl tvAdd [[_side], _text]; _treeIndex = [_side, _groupNum]; @@ -79,7 +79,7 @@ switch _mode do { }; } forEach _units; } forEach allGroups; - + if (!isNull GVAR(unit)) then { if (alive GVAR(unit)) then { _treeIndex = _unitList select ((_unitList find GVAR(unit)) + 1); @@ -87,13 +87,13 @@ switch _mode do { }; }; }; - + case "Select": { - + _ctrl = _this select 0; _selection = _this select 1; if (count _selection < 2) exitWith {}; - + _str = _ctrl tvData _selection; _unit = missionNamespace getVariable _str; GVAR(unit) = _unit; @@ -103,4 +103,4 @@ switch _mode do { ["Camera", ["SwitchUnit"]] call FUNC(camera); }; }; -}; \ No newline at end of file +}; diff --git a/addons/spectator/functions/fnc_respawn.sqf b/addons/spectator/functions/fnc_respawn.sqf index dba2f6a850..f01fef1b3a 100644 --- a/addons/spectator/functions/fnc_respawn.sqf +++ b/addons/spectator/functions/fnc_respawn.sqf @@ -22,4 +22,4 @@ _unit = _this select 0; _unit setVariable [QGVAR(name), name _unit, true]; -//_unit setVariable [QGVAR(listed), false]; \ No newline at end of file +//_unit setVariable [QGVAR(listed), false]; diff --git a/addons/spectator/functions/fnc_sideColour.sqf b/addons/spectator/functions/fnc_sideColour.sqf index 1262ae5b07..0b4f6a21d7 100644 --- a/addons/spectator/functions/fnc_sideColour.sqf +++ b/addons/spectator/functions/fnc_sideColour.sqf @@ -32,7 +32,7 @@ _colour = switch _side do { GETCOLOUR('Map_BLUFOR_B', 0.6) ] }; - + case OPFOR: { [ GETCOLOUR('Map_OPFOR_R', 0.5), @@ -40,7 +40,7 @@ _colour = switch _side do { GETCOLOUR('Map_OPFOR_B', 0) ] }; - + case INDEPENDENT: { [ GETCOLOUR('Map_Independent_R', 0), @@ -48,7 +48,7 @@ _colour = switch _side do { GETCOLOUR('Map_Independent_B', 0) ] }; - + case CIVILIAN: { [ GETCOLOUR('Map_Civilian_R', 0.4), @@ -63,4 +63,4 @@ _colour set [1, (_colour select 1) * FACTOR]; _colour set [2, (_colour select 2) * FACTOR]; _colour set [3, 1]; -_colour \ No newline at end of file +_colour diff --git a/addons/spectator/functions/fnc_status.sqf b/addons/spectator/functions/fnc_status.sqf index 4207ef9c00..2306b1a64a 100644 --- a/addons/spectator/functions/fnc_status.sqf +++ b/addons/spectator/functions/fnc_status.sqf @@ -57,4 +57,4 @@ _timeAccText = (str ([GVAR(accTime), 4] call BIS_fnc_cutDecimals)) + "x"; _focusDist = [GVAR(focus) select 0, 1] call BIS_fnc_cutDecimals; _focusBlur = GVAR(focus) select 1; _focusText = if (_focusDist == -1 && _focusBlur == 1) then {"Auto"} else {if (_focusDist < 0) then {toString [8734]} else {str _focusDist + "m"}}; -(_display displayCtrl 6) ctrlSetText _focusText; \ No newline at end of file +(_display displayCtrl 6) ctrlSetText _focusText; diff --git a/addons/spectator/functions/fnc_trackUnits.sqf b/addons/spectator/functions/fnc_trackUnits.sqf index 28da75a554..a91be880cc 100644 --- a/addons/spectator/functions/fnc_trackUnits.sqf +++ b/addons/spectator/functions/fnc_trackUnits.sqf @@ -30,7 +30,7 @@ if (count GVAR(units) < 1) exitWith {}; _unit = _x; _pos = getPos _unit; _pos resize 2; - + _index = -1; {if ((_x select 0) == _unit) then {_index = _forEachIndex}} forEach GVAR(trackingArray); @@ -43,12 +43,12 @@ if (count GVAR(units) < 1) exitWith {}; _latestPos = _trackingArray select _latestIndex; _diffX = abs((_latestPos select 0) - (_pos select 0)); _diffY = abs((_latestPos select 1) - (_pos select 1)); - + if !((_diffX < 20) && (_diffY < 20)) then { - _trackingArray pushBack _pos; + _trackingArray pushBack _pos; _unitArray set [1, _trackingArray]; GVAR(trackingArray) set [_index, _unitArray]; }; }; - -} forEach GVAR(units); \ No newline at end of file + +} forEach GVAR(units); diff --git a/addons/spectator/functions/fnc_unitInfo.sqf b/addons/spectator/functions/fnc_unitInfo.sqf index a377cabf31..df072d51d5 100644 --- a/addons/spectator/functions/fnc_unitInfo.sqf +++ b/addons/spectator/functions/fnc_unitInfo.sqf @@ -31,4 +31,4 @@ if (!alive _unit) then { _colour set [3, 0.8]; }; -[_name, _side, _colour] \ No newline at end of file +[_name, _side, _colour] diff --git a/addons/spectator/functions/fnc_unitSide.sqf b/addons/spectator/functions/fnc_unitSide.sqf index d33520d5ec..56ea2c0ce7 100644 --- a/addons/spectator/functions/fnc_unitSide.sqf +++ b/addons/spectator/functions/fnc_unitSide.sqf @@ -36,4 +36,4 @@ if (alive _unit) then { }; }; -_side \ No newline at end of file +_side diff --git a/addons/spectator/functions/fnc_unitVar.sqf b/addons/spectator/functions/fnc_unitVar.sqf index 6d072ae171..b2f332a813 100644 --- a/addons/spectator/functions/fnc_unitVar.sqf +++ b/addons/spectator/functions/fnc_unitVar.sqf @@ -23,16 +23,16 @@ _var = _object getVariable [QGVAR(objectVar), ""]; if (_var == "") then { _var = vehicleVarname _object; - + if (_var == "") then { _var = [_this, 1, QGVAR(obj), [""]] call BIS_fnc_param; _varID = [_var, 1] call BIS_fnc_counter; _var = _var + str _varID; }; - + _object setVariable [QGVAR(objectVar), _var]; missionNamespace setVariable [_var, _object]; _object setVehicleVarname _var; }; -_var \ No newline at end of file +_var