]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Declare weapon_cnt just where it's used to avoid possible confusion with weapon_count
authorterencehill <piuntn@gmail.com>
Thu, 12 May 2011 20:54:08 +0000 (22:54 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 12 May 2011 20:54:08 +0000 (22:54 +0200)
qcsrc/client/hud.qc

index 7924c2983edf99f8a4db35bde3178290f6ea85fe..a3926d012fd404978301d855f2628ada64100d07 100644 (file)
@@ -734,11 +734,10 @@ void HUD_Weapons(void)
                }
        }
 
-       float weapid, wpnalpha, weapon_cnt;
-
        // TODO make this configurable
        if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0])
        {
+               float weapon_cnt;
                if(weaponorder_bypriority)
                        strunzone(weaponorder_bypriority);
                if(weaponorder_byimpulse)
@@ -772,6 +771,8 @@ void HUD_Weapons(void)
                panel_size -= '2 2 0' * panel_bg_padding;
        }
 
+       float weapid, wpnalpha;
+
        if(autocvar_hud_panel_weapons_fade)
        {
                wpnalpha = 3.2 - 2 * (time - weapontime);