diff --git a/addons/spike/functions/fnc_camera_changeZoom.sqf b/addons/spike/functions/fnc_camera_changeZoom.sqf index e536835bf9..5e17d0a4d9 100644 --- a/addons/spike/functions/fnc_camera_changeZoom.sqf +++ b/addons/spike/functions/fnc_camera_changeZoom.sqf @@ -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; diff --git a/addons/spike/functions/fnc_camera_cycleViewMode.sqf b/addons/spike/functions/fnc_camera_cycleViewMode.sqf index f433e997a7..892a3b5f8c 100644 --- a/addons/spike/functions/fnc_camera_cycleViewMode.sqf +++ b/addons/spike/functions/fnc_camera_cycleViewMode.sqf @@ -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 { diff --git a/addons/spike/functions/fnc_camera_update.sqf b/addons/spike/functions/fnc_camera_update.sqf index 8bf7a55b0d..63ed16bc93 100644 --- a/addons/spike/functions/fnc_camera_update.sqf +++ b/addons/spike/functions/fnc_camera_update.sqf @@ -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; }; diff --git a/addons/spike/initKeybinds.inc.sqf b/addons/spike/initKeybinds.inc.sqf index bcacef6017..4ca0464b00 100644 --- a/addons/spike/initKeybinds.inc.sqf +++ b/addons/spike/initKeybinds.inc.sqf @@ -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- \ No newline at end of file +[74, [false, false, false]], false] call CBA_fnc_addKeybind; //Keypad-