From 416d559354971a0482f744b169a2de982006665a Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Sat, 8 Aug 2015 20:51:24 +0100 Subject: [PATCH] Expand common isFeatureCameraActive function The function is currently only used by ace_goggles and it makes sense to expand it to detect if any common feature camera is active rather than just BI cameras --- .../functions/fnc_isFeatureCameraActive.sqf | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/addons/common/functions/fnc_isFeatureCameraActive.sqf b/addons/common/functions/fnc_isFeatureCameraActive.sqf index 250beaa3ca..0b91b19e55 100644 --- a/addons/common/functions/fnc_isFeatureCameraActive.sqf +++ b/addons/common/functions/fnc_isFeatureCameraActive.sqf @@ -1,31 +1,35 @@ /* * Author: Sniperwolf572 + * Checks if one of the following common feature cameras is active: * - * Checks if one of the following BI feature cameras are active: - * - * - Classic camera (BIS_fnc_cameraOld) - * - Splendid camera (BIS_fnc_camera) + * - Curator + * - ACE Spectator * - Arsenal camera (BIS_fnc_arsenal) - * - Animation viewer (BIS_fnc_animViewer) * - Establishing shot (BIS_fnc_establishingShot) + * - Splendid camera (BIS_fnc_camera) + * - Animation viewer (BIS_fnc_animViewer) + * - Classic camera (BIS_fnc_cameraOld) * * Arguments: - * None + * 0: None * - * Return value: - * Is BI feature camera active (bool) + * Return Value: + * A feature camera is active * * Example: - * call ace_common_fnc_isFeatureCameraActive; + * [] call ace_common_fnc_isFeatureCameraActive * + * Public: No */ #include "script_component.hpp" -( - !isNull (missionNamespace getVariable ["BIS_DEBUG_CAM", objNull]) || // Classic camera - {!isNull (missionNamespace getVariable ["BIS_fnc_camera_cam", objNull])} || // Splendid camera - {!isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull])} || // Arsenal camera - {!isNull (uiNamespace getVariable ["BIS_fnc_animViewer_cam", objNull])} || // Animation viewer camera - {!isNull (missionNamespace getVariable ["BIS_fnc_establishingShot_fakeUAV", objNull])} // Establishing shot camera -) \ No newline at end of file +!( + isNull curatorCamera && // Curator + {isNull (GETMVAR(EGVAR(spectator,camera),objNull))} && // ACE Spectator + {isNull (GETUVAR(BIS_fnc_arsenal_cam, objNull))} && // Arsenal camera + {isNull (GETMVAR(BIS_fnc_establishingShot_fakeUAV, objNull))} && // Establishing shot camera + {isNull (GETMVAR(BIS_fnc_camera_cam, objNull))} && // Splendid camera + {isNull (GETUVAR(BIS_fnc_animViewer_cam, objNull))} && // Animation viewer camera + {isNull (GETMVAR(BIS_DEBUG_CAM, objNull))} // Classic camera +)