]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Merge remote branch 'origin/diabolik/newpanelhud' into fruitiex/newpanelhud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 1cbed12940df793a0bc56f3626c34931872b9010..7d87df8f7d347649848ac8db2f76e6396d424cc8 100644 (file)
@@ -1166,6 +1166,19 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
        if(!hud_configure)
                return false;
 
+       // allow console bind to work
+       string con_keys;
+       float keys;
+       con_keys = findkeysforcommand("toggleconsole");
+       keys = tokenize(con_keys);
+
+       float hit_con_bind, i;
+       for (i = 0; i < keys; ++i)
+       {
+               if(nPrimary == stof(argv(i)))
+                       hit_con_bind = 1;
+       }
+
        prevMouseClicked = mouseClicked;
        if(nPrimary == K_MOUSE1)
        {
@@ -1183,6 +1196,9 @@ float HUD_Panel_InputEvent(float bInputType, float nPrimary, float nSecondary)
                localcmd("menu_showhudexit\n");
        }
 
+       else if(hit_con_bind)
+               return false;
+
        return true; // Suppress ALL other input
 }
 
@@ -3947,4 +3963,8 @@ void HUD_Main (void)
                HUD_ShowSpeed();
        if (cvar("cl_showacceleration"))
                HUD_ShowAcceleration();
+
+       if (hud_configure && spectatee_status) // try to join if we are in hud_configure mode, but still spectating (in order to get rid of motd and such)
+               localcmd("cmd selectteam auto; cmd join\n");
+
 }