]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge branch 'master' into terencehill/newpanelhud
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index 75e7320c9e8d3eb90f0ff66388cda0685092cc69..3cd3cb1165de90f96fb47f2206c45de7862b27b8 100644 (file)
@@ -166,7 +166,9 @@ void CSQC_Init(void)
        minimapname = strzone(minimapname);
 
        WarpZone_Init();
+
        hud_configure_prev = -1;
+       tab_panel = -1;
 }
 
 // CSQC_Shutdown : Called every time the CSQC code is shutdown (changing maps, quitting, etc)
@@ -608,6 +610,7 @@ void GameCommand(string msg)
             vote_prev = 0;
             cvar_set("cl_allow_uid2name", "1");
             vote_change = -9999;
+                       uid2name_dialog = 0;
         }
         else
         {
@@ -622,6 +625,7 @@ void GameCommand(string msg)
             vote_prev = 0;
             cvar_set("cl_allow_uid2name", "0");
             vote_change = -9999;
+                       uid2name_dialog = 0;
         }
         else
         {
@@ -991,15 +995,6 @@ void CSQC_Ent_Remove()
 
 void Gamemode_Init()
 {
-       if(gametype == GAME_ONSLAUGHT) {
-               print(strcat("Using ", minimapname, " as minimap.\n"));
-               precache_pic("gfx/ons-cp-neutral.tga");
-               precache_pic("gfx/ons-cp-red.tga");
-               precache_pic("gfx/ons-cp-blue.tga");
-               precache_pic("gfx/ons-frame.tga");
-               precache_pic("gfx/ons-frame-team.tga");
-       }
-
        if not(isdemo())
        {
                localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n");
@@ -1406,7 +1401,7 @@ string getcommandkey(string text, string command)
        string keys;
        float n, j, k, l;
 
-       if (!hud_showbinds)
+       if (!autocvar_hud_showbinds)
                return text;
 
        keys = db_get(binddb, command);
@@ -1424,7 +1419,7 @@ string getcommandkey(string text, string command)
                                        keys = strcat(keys, ", ", keynumtostring(k));
 
                                ++l;
-                               if (hud_showbinds_limit > 0 && hud_showbinds_limit >= l) break;
+                               if (autocvar_hud_showbinds_limit > 0 && autocvar_hud_showbinds_limit >= l) break;
                        }
 
                }
@@ -1432,12 +1427,12 @@ string getcommandkey(string text, string command)
        }
 
        if ("" == keys) {
-               if (hud_showbinds > 1)
+               if (autocvar_hud_showbinds > 1)
                        return sprintf(_("%s (not bound)"), text);
                else
                        return text;
        }
-       else if (hud_showbinds > 1)
+       else if (autocvar_hud_showbinds > 1)
                return sprintf(_("%s (%s)"), text, keys);
        else
                return keys;