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 6499c5c..89519d6 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)
                {