]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/radar.qc
Fix ESC key not closing team selection if automatically opened by the server, scorebo...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / radar.qc
index f4bae2024cca45fc9b95fe7b14c8ae09fd127408..a5b17d75eec767e5004252d53dc5818b293d1f93 100644 (file)
@@ -1,11 +1,12 @@
 #include "radar.qh"
 
 #include <client/draw.qh>
+#include <client/hud/panel/scoreboard.qh>
 #include <client/mapvoting.qh>
-#include <client/resources.qh>
 #include <client/teamradar.qh>
 #include <common/ent_cs.qh>
 #include <common/mutators/mutator/waypoints/all.qh>
+#include <common/resources/cl_resources.qh>
 
 // Radar (#6)
 
@@ -39,12 +40,7 @@ void HUD_Radar_Show_Maximized(bool doshow, bool clickable)
                {
                        hud_panel_radar_mouse = 1;
 
-                       // we must unset the player's buttons, as they aren't released elsewhere
-                       localcmd("-fire\n");
-                       localcmd("-fire2\n");
-                       localcmd("-use\n");
-                       localcmd("-hook\n");
-                       localcmd("-jump\n");
+                       Release_Common_Keys();
                }
        }
        else if ( hud_panel_radar_mouse )
@@ -136,13 +132,7 @@ void HUD_Radar_Mouse()
        if ( !hud_panel_radar_mouse ) return;
        if(mv_active) return;
 
-       if ( intermission )
-       {
-               HUD_Radar_Hide_Maximized();
-               return;
-       }
-
-       if(mouseClicked & S_MOUSE2)
+       if (intermission || scoreboard_ui_enabled || (mouseClicked & S_MOUSE2))
        {
                HUD_Radar_Hide_Maximized();
                return;