]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix weapon count when there's a complain_weapon (add it only if you don't have it!)
authorterencehill <piuntn@gmail.com>
Mon, 2 Feb 2015 18:43:13 +0000 (19:43 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 2 Feb 2015 18:43:13 +0000 (19:43 +0100)
qcsrc/client/hud.qc

index 6499c5c3a2e8e3ec068b58bb81c0f047e739930e..89519d627c65b97ef56080b55c71836a9923b9ef 100644 (file)
@@ -510,13 +510,9 @@ void HUD_Weapons(void)
                // do we own this weapon?
                weapon_count = 0;
                for(i = 0; i <= WEP_LAST-WEP_FIRST; ++i)
-                       if(weapons_stat & WepSet_FromWeapon(weaponorder[i].weapon))
+                       if((weapons_stat & WepSet_FromWeapon(weaponorder[i].weapon)) || (weaponorder[i].weapon == complain_weapon))
                                ++weapon_count;
 
-               // add it anyway if weaponcomplain is shown
-               if(complain_weapon)
-                       ++weapon_count;
-
                // might as well commit suicide now, no reason to live ;)
                if (weapon_count == 0)
                {