From c20ec6599ddfd0ed3ed2ba2b1e5762750a582f0e Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 4 Nov 2017 11:03:51 -0500 Subject: [PATCH] Spectator - Fix script error in ui_draw3d (#5722) --- addons/spectator/functions/fnc_cam.sqf | 1 + addons/spectator/functions/fnc_respawnTemplate.sqf | 1 + addons/spectator/functions/fnc_setSpectator.sqf | 1 + addons/spectator/functions/fnc_ui.sqf | 1 + addons/spectator/functions/fnc_ui_draw3D.sqf | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/spectator/functions/fnc_cam.sqf b/addons/spectator/functions/fnc_cam.sqf index 74b7d23d73..4baf3aee55 100644 --- a/addons/spectator/functions/fnc_cam.sqf +++ b/addons/spectator/functions/fnc_cam.sqf @@ -17,6 +17,7 @@ #include "script_component.hpp" params ["_init"]; +TRACE_1("cam",_init); // No change if (_init isEqualTo !isNil QGVAR(camera)) exitWith {}; diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index 24a0e358f4..14cd6c053d 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -23,6 +23,7 @@ #include "script_component.hpp" params [["_newCorpse",objNull,[objNull]], ["_oldKiller",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; +TRACE_4("respawnTemplate",_newCorpse,_oldKiller,_respawn,_respawnDelay); // Compatibility handled via spectator display XEH if (_respawn in [0,1,4,5]) exitWith { diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index c7087d6d5b..ca829559e7 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -101,6 +101,7 @@ if (_set) then { // Hide/Unhide the player if enabled and alive if (alive player) then { private _hidden = (_hide && _set); + TRACE_1("",_hidden); // Ignore damage (vanilla and ace_medical) player allowDamage !_hidden; diff --git a/addons/spectator/functions/fnc_ui.sqf b/addons/spectator/functions/fnc_ui.sqf index 69ee454d8b..1986684109 100644 --- a/addons/spectator/functions/fnc_ui.sqf +++ b/addons/spectator/functions/fnc_ui.sqf @@ -17,6 +17,7 @@ #include "script_component.hpp" params ["_init"]; +TRACE_1("ui",_init); // No change if (_init isEqualTo !isNull SPEC_DISPLAY) exitWith {}; diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 185d8f9dd9..36ec3d0098 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -18,7 +18,7 @@ #define HEIGHT_OFFSET 1.5 BEGIN_COUNTER(updateCursor); -private _camTarget = GVAR(camFocus); +private _camTarget = missionNamespace getVariable [QGVAR(camFocus), objNull]; private _camTargetVeh = vehicle _camTarget; private _cursorObject = objNull;