From: terencehill <piuntn@gmail.com>
Date: Mon, 2 Feb 2015 18:43:13 +0000 (+0100)
Subject: Fix weapon count when there's a complain_weapon (add it only if you don't have it!)
X-Git-Tag: xonotic-v0.8.1~129^2~1
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a035d049951445f892a37bfdef3e738f8a18e8b9;p=xonotic%2Fxonotic-data.pk3dir.git

Fix weapon count when there's a complain_weapon (add it only if you don't have it!)
---

diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc
index 6499c5c3a..89519d627 100644
--- a/qcsrc/client/hud.qc
+++ b/qcsrc/client/hud.qc
@@ -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)
 		{