diff --git a/addons/spectator/UI/interface.hpp b/addons/spectator/UI/interface.hpp index 2ac33e4a64..182263e7b4 100644 --- a/addons/spectator/UI/interface.hpp +++ b/addons/spectator/UI/interface.hpp @@ -180,7 +180,7 @@ class GVAR(interface) { y = safeZoneY; w = safeZoneW; h = safeZoneH; - onMouseButtonDblClick = QUOTE([ARR_2('onMapDblClick',_this)] call FUNC(handleInterface)); + onMouseButtonDown = QUOTE([ARR_2('onMapClick',_this)] call FUNC(handleInterface)); onDraw = QUOTE([ARR_2('onDraw',_this)] call FUNC(handleInterface)); }; class helpSplash: RscControlsGroupNoScrollbars { diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index defe5332ba..502ce65fd4 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -40,8 +40,9 @@ switch (toLower _mode) do { GVAR(camera) = "Camera" camCreate (ASLtoATL GVAR(camPos)); [] call FUNC(transitionCamera); - // Close map + // Close map and clear radio openMap [false,false]; + clearRadio; // Disable BI damage effects BIS_fnc_feedback_allowPP = false; @@ -76,8 +77,9 @@ switch (toLower _mode) do { GVAR(camera) cameraEffect ["terminate", "back"]; camDestroy GVAR(camera); - // Return to player view clearRadio; + + // Return to player view _unit switchCamera "internal"; // Enable BI damage effects @@ -232,7 +234,7 @@ switch (toLower _mode) do { // Handle held keys (prevent repeat calling) if (_dik in GVAR(heldKeys)) exitwith {}; // Exclude movement keys so that speed can be adjusted on fly - if !(_dik in [17,30,31,32]) then { + if !(_dik in [16,17,30,31,32,44]) then { GVAR(heldKeys) pushBack _dik; }; @@ -422,8 +424,8 @@ switch (toLower _mode) do { _tree tvSort [[],false]; }; // Map events - case "onmapdblclick": { - _args params ["_map","_button","_x","_y"]; + case "onmapclick": { + _args params ["_map","_button","_x","_y","_shift","_ctrl","_alt"]; private ["_newPos","_oldZ"]; if ((GVAR(camMode) == 0) && (_button == 0)) then { diff --git a/addons/spectator/functions/fnc_transitionCamera.sqf b/addons/spectator/functions/fnc_transitionCamera.sqf index 4957540fa4..90a2dc776b 100644 --- a/addons/spectator/functions/fnc_transitionCamera.sqf +++ b/addons/spectator/functions/fnc_transitionCamera.sqf @@ -53,7 +53,9 @@ if (_newMode == 0) then { // Free GVAR(camera) camSetFov -(linearConversion [0.01,2,GVAR(camZoom),-2,-0.01,true]); GVAR(camera) camCommit 0; - // Agent is switched to in free cam to hide death table and prevent AI chat + // Agent is switched to in free cam to hide death table and prevent AI chat while allowing icons to draw + // However, map click events don't fire in free cam for some reason... + // (Why is so much stuff tied into the current camera unit BI?!) if (isNull GVAR(camAgent)) then { GVAR(camAgent) = createAgent ["VirtualMan_F",markerPos QGVAR(respawn),[],0,""]; };