]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Access directly these autocvars
authorterencehill <piuntn@gmail.com>
Thu, 30 Dec 2010 20:44:39 +0000 (21:44 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 30 Dec 2010 20:44:39 +0000 (21:44 +0100)
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/main.qh

index 49467ce15d5a7d0c4dc4ec3de623d5311996e880..1f958e98a4d2d8fbc3016f4648a57a8d2f2a7a03 100644 (file)
@@ -1406,7 +1406,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 +1424,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 +1432,12 @@ string getcommandkey(string text, string command)
        }
 
        if ("" == keys) {
-               if (hud_showbinds > 1)
+               if (autocvar_hud_showbinds > 1)
                        return strcat(text, " (not bound)");
                else
                        return text;
        }
-       else if (hud_showbinds > 1)
+       else if (autocvar_hud_showbinds > 1)
                return strcat(text, " (", keys, ")");
        else
                return keys;
index 6f2bb6e025b3270abade4b3b3f2b77b1559f799b..5d16181c8ca7382229acb07f82b837c47f167c7e 100644 (file)
@@ -547,10 +547,6 @@ void CSQC_UpdateView(float w, float h)
        // Draw the Engine Status Bar (the default Quake HUD)
        R_SetView(VF_DRAWENGINEHUD, 0);
 
-       // fetch this one only once per frame
-       hud_showbinds = autocvar_hud_showbinds;
-       hud_showbinds_limit = autocvar_hud_showbinds_limit;
-
        // Update the mouse position
        /*
           mousepos_x = vid_conwidth;
index 09f7c3680700ce4193f92c253e388b42dd38bccf..8f690bb18adfcd3132832dae5f854393eac4a6ba 100644 (file)
@@ -773,7 +773,6 @@ void HUD_Weapons(void)
        }
 
        float weapons_st = getstati(STAT_WEAPONS);
-       float label = autocvar_hud_panel_weapons_label;
 
        for(i = 0; i < weapon_cnt; ++i)
        {
@@ -813,9 +812,9 @@ void HUD_Weapons(void)
                {
                        drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
 
-                       if(label == 1) // weapon number
+                       if(autocvar_hud_panel_weapons_label == 1) // weapon number
                                drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                       else if(label == 2) // bind
+                       else if(autocvar_hud_panel_weapons_label == 2) // bind
                                drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        // draw ammo status bar
index 3219d338f9035f560daa1555d84ff2b946284f8f..5f15d41a025992b9faf16969f21ec2ab20dbd6fe 100644 (file)
@@ -121,8 +121,6 @@ float ignore_minus_zoom;
 float warmup_stage;
 
 string getcommandkey(string text, string command);
-float hud_showbinds;
-float hud_showbinds_limit;
 
 string vote_called_vote;
 float ready_waiting;