From eec5f458db71aa2f825d8e534593a1460ec1c910 Mon Sep 17 00:00:00 2001 From: Tenga Date: Fri, 10 Apr 2015 20:05:33 +0200 Subject: [PATCH 1/2] Count the commander camera as a 3rd person camera --- AUTHORS.txt | 1 + addons/goggles/functions/fnc_externalCamera.sqf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index b931d774ac..c50bb97935 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -62,6 +62,7 @@ Raspu86 Riccardo Petricca Robert Boklahánics simon84 +Sniperwolf572 Tonic Tourorist Valentin Torikian diff --git a/addons/goggles/functions/fnc_externalCamera.sqf b/addons/goggles/functions/fnc_externalCamera.sqf index 9161804a56..0a098cf8be 100644 --- a/addons/goggles/functions/fnc_externalCamera.sqf +++ b/addons/goggles/functions/fnc_externalCamera.sqf @@ -16,4 +16,4 @@ #include "script_component.hpp" if (GVAR(showInThirdPerson)) exitWith { false }; -(cameraView == "External") +(cameraView == "EXTERNAL" || cameraView == "GROUP") From c8cff6e91c259b55993fbfa062630a7b805faf29 Mon Sep 17 00:00:00 2001 From: Tenga Date: Fri, 10 Apr 2015 21:48:18 +0200 Subject: [PATCH 2/2] - Added isFeatureCameraActive to ace_common - ace_goggles_fnc_externalCamera now checks for cameras made by a BI feature --- addons/common/XEH_preInit.sqf | 1 + .../functions/fnc_isFeatureCameraActive.sqf | 31 +++++++++++++++++++ .../goggles/functions/fnc_externalCamera.sqf | 3 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 addons/common/functions/fnc_isFeatureCameraActive.sqf diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index a88c349180..e7169f1d23 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -107,6 +107,7 @@ PREP(isAutoWind); PREP(isAwake); PREP(isEngineer); PREP(isEOD); +PREP(isFeatureCameraActive); PREP(isInBuilding); PREP(isModLoaded); PREP(isPlayer); diff --git a/addons/common/functions/fnc_isFeatureCameraActive.sqf b/addons/common/functions/fnc_isFeatureCameraActive.sqf new file mode 100644 index 0000000000..dd60a90709 --- /dev/null +++ b/addons/common/functions/fnc_isFeatureCameraActive.sqf @@ -0,0 +1,31 @@ +/* + * Author: Sniperwolf572 + * + * Checks if one of the following BI feature cameras are active: + * + * - Classic camera (BIS_fnc_cameraOld) + * - Splendid camera (BIS_fnc_camera) + * - Arsenal camera (BIS_fnc_arsenal) + * - Animation viewer (BIS_fnc_animViewer) + * - Establishing shot (BIS_fnc_establishingShot) + * + * Arguments: + * None + * + * Return value: + * Is BI feature camera active (bool) + * + * Example: + * call ace_common_fnc_isFeatureCameraActive; + * + */ + +#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 diff --git a/addons/goggles/functions/fnc_externalCamera.sqf b/addons/goggles/functions/fnc_externalCamera.sqf index 0a098cf8be..ddc05e6b87 100644 --- a/addons/goggles/functions/fnc_externalCamera.sqf +++ b/addons/goggles/functions/fnc_externalCamera.sqf @@ -16,4 +16,5 @@ #include "script_component.hpp" if (GVAR(showInThirdPerson)) exitWith { false }; -(cameraView == "EXTERNAL" || cameraView == "GROUP") + +(cameraView in ["EXTERNAL", "GROUP"] || {call EFUNC(common,isFeatureCameraActive)})