]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Reduce scope of AMMO_COUNT
authorterencehill <piuntn@gmail.com>
Tue, 14 May 2013 17:49:39 +0000 (19:49 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 14 May 2013 17:49:39 +0000 (19:49 +0200)
qcsrc/client/hud.qc
qcsrc/common/items.qh

index 4626bd96852967c61bbc3b4a7e51f37096ff214a..7058cdbf7bdd04c6e92665ddd09e88e2d44edfad 100644 (file)
@@ -942,7 +942,7 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s
 
 void HUD_Ammo(void)
 {
-    if(hud != HUD_NORMAL) return;
+       if(hud != HUD_NORMAL) return;
        if(!autocvar__hud_configure)
        {
                if(!autocvar_hud_panel_ammo) return;
@@ -965,6 +965,7 @@ void HUD_Ammo(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
+       const float AMMO_COUNT = 4;
        float rows = 0, columns, row, column;
        vector ammo_size;
        if (autocvar_hud_panel_ammo_onlycurrent)
index ba42d55ac62ecfffe98b046e1465055bbf607ce2..0bf8fd8efff5e08a1a534022c82401de61c37eab 100644 (file)
@@ -51,8 +51,6 @@ float   IT_AMMO                      = 3968; // IT_SHELLS | IT_NAILS | IT_ROCKET
 float   IT_PICKUPMASK                = 51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
 float   IT_UNLIMITED_AMMO            = 3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
 
-float AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
-
 // variables:
 string weaponorder_byid;