More minor cleanup

This commit is contained in:
johnb432 2024-08-30 16:00:39 +02:00
parent c7b82a51f3
commit 9f16aa2a5d
4 changed files with 18 additions and 14 deletions

View File

@ -17,10 +17,12 @@
*/
params ["_cameraNamespace", "_increase"];
private _zoomIndex = _cameraNamespace getVariable [QGVAR(currentZoomIndex), 0];
private _zoomArray = _cameraNamespace getVariable [QGVAR(fovLevels), []];
if ((count _zoomArray) == 0) exitWith {};
if (_zoomArray isEqualTo []) exitWith {};
private _zoomIndex = _cameraNamespace getVariable [QGVAR(currentZoomIndex), 0];
if (_increase) then {
if ((_zoomIndex + 1) < count _zoomArray) then {
_zoomIndex = _zoomIndex + 1;

View File

@ -18,9 +18,11 @@
params ["_cameraNamespace"];
private _tiIndex = _cameraNamespace getVariable [QGVAR(currentTIModeIndex), 0];
if (_tiArray isEqualTo []) exitWith {};
private _tiArray = _cameraNamespace getVariable [QGVAR(thermalTypes), []];
if ((count _tiArray) == 0) exitWith {};
if ((_tiIndex + 1) >= count _tiArray) then {
_tiIndex = 0;
} else {

View File

@ -204,7 +204,7 @@ private _surfaceIntersections = lineIntersectsSurfaces [_cameraPosASL, _projecte
private _pointPos = [0, 0, 0];
private _groundPos = terrainIntersectAtASL [_cameraPosASL, _projectedPos];
if (count _surfaceIntersections > 0) then {
if (_surfaceIntersections isNotEqualTo []) then {
_pointPos = (_surfaceIntersections select 0) select 0;
};

View File

@ -1,4 +1,4 @@
["ACE3 Weapons", QGVAR(Designate), localize LSTRING(Designate),
["ACE3 Weapons", QGVAR(Designate), LLSTRING(Designate),
{
[SPIKE_KEY_DESIGNATE, true] call FUNC(keyDown);
},
@ -7,7 +7,7 @@
},
[15, [false, false, false]], false] call CBA_fnc_addKeybind; // Tab
["ACE3 Weapons", QGVAR(LeaveCamera), localize LSTRING(LeaveCamera),
["ACE3 Weapons", QGVAR(LeaveCamera), LLSTRING(LeaveCamera),
{
[SPIKE_KEY_LEAVE, true] call FUNC(keyDown);
},
@ -16,7 +16,7 @@
},
[15, [false, true, false]], false] call CBA_fnc_addKeybind; // Ctrl+Tab
["ACE3 Weapons", QGVAR(PanUp), localize LSTRING(PanUp),
["ACE3 Weapons", QGVAR(PanUp), LLSTRING(PanUp),
{
[CAMERA_KEY_UP, true] call FUNC(keyDown);
},
@ -25,7 +25,7 @@
},
[200, [false, false, false]], false] call CBA_fnc_addKeybind; //Up Arrow
["ACE3 Weapons", QGVAR(PanLeft), localize LSTRING(PanLeft),
["ACE3 Weapons", QGVAR(PanLeft), LLSTRING(PanLeft),
{
[CAMERA_KEY_LEFT, true] call FUNC(keyDown);
},
@ -34,7 +34,7 @@
},
[203, [false, false, false]], false] call CBA_fnc_addKeybind; //Left
["ACE3 Weapons", QGVAR(PanRight), localize LSTRING(PanRight),
["ACE3 Weapons", QGVAR(PanRight), LLSTRING(PanRight),
{
[CAMERA_KEY_RIGHT, true] call FUNC(keyDown);
},
@ -43,7 +43,7 @@
},
[205, [false, false, false]], false] call CBA_fnc_addKeybind; //Right
["ACE3 Weapons", QGVAR(PanDown), localize LSTRING(PanDown),
["ACE3 Weapons", QGVAR(PanDown), LLSTRING(PanDown),
{
[CAMERA_KEY_DOWN, true] call FUNC(keyDown);
},
@ -52,7 +52,7 @@
},
[208, [false, false, false]], false] call CBA_fnc_addKeybind; //Down
["ACE3 Weapons", QGVAR(CycleVisionMode), localize LSTRING(Camera_ViewModeCycle),
["ACE3 Weapons", QGVAR(CycleVisionMode), LLSTRING(Camera_ViewModeCycle),
{
[CAMERA_KEY_CHANGE_VISION_MODE, true] call FUNC(keyDown);
},
@ -61,7 +61,7 @@
},
[49, [false, false, false]], false] call CBA_fnc_addKeybind; //N
["ACE3 Weapons", QGVAR(ZoomIn), localize LSTRING(ZoomIn),
["ACE3 Weapons", QGVAR(ZoomIn), LLSTRING(ZoomIn),
{
[CAMERA_KEY_ZOOM_IN, true] call FUNC(keyDown);
},
@ -70,11 +70,11 @@
},
[78, [false, false, false]], false] call CBA_fnc_addKeybind; //Keypad+
["ACE3 Weapons", QGVAR(ZoomOut), localize LSTRING(ZoomOut),
["ACE3 Weapons", QGVAR(ZoomOut), LLSTRING(ZoomOut),
{
[CAMERA_KEY_ZOOM_OUT, true] call FUNC(keyDown);
},
{
[CAMERA_KEY_ZOOM_OUT, false] call FUNC(keyDown);
},
[74, [false, false, false]], false] call CBA_fnc_addKeybind; //Keypad-
[74, [false, false, false]], false] call CBA_fnc_addKeybind; //Keypad-