]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/diabolik/newpanelhud' into fruitiex/newpanelhud
authorFruitieX <rasse@rasse-lappy.localdomain>
Wed, 9 Jun 2010 23:41:33 +0000 (02:41 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Wed, 9 Jun 2010 23:41:33 +0000 (02:41 +0300)
qcsrc/client/csqc_builtins.qc
qcsrc/client/hud.qc

index 83955df8ca30680f44589f7049427e5a222848c6..603ac552fbd0dccb6d78d8a1918e95dc59457deb 100644 (file)
@@ -281,6 +281,7 @@ string(string info, string key) infoget = #227;
 string(string info, string key, string value, ...) infoadd = #226;
 string(string in) uri_escape = #510;
 
+float stringtokeynum(string keyname) = #341;
 string keynumtostring(float keynum) = #520;
 string findkeysforcommand(string command) = #521;
 
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");
+
 }