[nexuiz-commits] r8032 - in trunk/data: . qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Oct 3 13:08:14 EDT 2009


Author: fruitiex
Date: 2009-10-03 13:08:14 -0400 (Sat, 03 Oct 2009)
New Revision: 8032

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/client/sbar.qc
Log:
new cvar for enabling/disabling the weapon icons


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-10-03 16:55:02 UTC (rev 8031)
+++ trunk/data/defaultNexuiz.cfg	2009-10-03 17:08:14 UTC (rev 8032)
@@ -1247,9 +1247,10 @@
 seta sbar_scoreboard_alpha_bg 0.6 "scoreboard background alpha"
 seta sbar_scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
 seta sbar_hudselector 1	"0 = health/armor positions flipped, 1 = default hud layout, 2 = combined health and armor display"
-seta sbar_hud_accuracy 0 "1 = weapon accuracy on HUD"
+seta sbar_hud_accuracy 0 "1 = weapon accuracy on the weapon icons"
 seta sbar_showcurrentammo 0 "0 = show all ammo types, 1 = show only the ammo type of the current weapon"
 seta sbar_increment_maptime 0	"1 = show elapsed time on the timer"
+seta sbar_showweaponicons 1 "1 = show icons of weapons that you have"
 
 // for menu server list (eventually make them have engine support?)
 seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2009-10-03 16:55:02 UTC (rev 8031)
+++ trunk/data/qcsrc/client/sbar.qc	2009-10-03 17:08:14 UTC (rev 8032)
@@ -2538,19 +2538,6 @@
 			Sbar_DrawXNum_Colored(health_pos, x, 24, sbar_alpha_fg);
 		}
 
-		// weapon icons
-		x = 1.0;
-		Sbar_DrawWeapon_Clear();
-		for(i = 1; i <= 24; ++i)
-		{
-			if(weaponimpulse[i-1] >= 0)
-			if(stat_weapons & x)
-			{
-				Sbar_DrawWeapon(i-1, fade, (i == activeweapon), i);
-			}
-			x *= 2;
-		}
-
 		// ammo
 		float a; // i will be the ammo type (already declared), a will contain how much ammo there is of type i
 
@@ -2638,7 +2625,20 @@
 
 		// draw strength/invincibility icon and timer
 		CSQC_Strength_Timer();
-		
+
+		// weapon icons
+                if(cvar("sbar_showweaponicons")) {
+			x = 1.0;
+               		Sbar_DrawWeapon_Clear();
+                	for(i = 1; i <= 24; ++i)
+                	{
+                        	if(weaponimpulse[i-1] >= 0)
+                       		if(stat_weapons & x)
+					Sbar_DrawWeapon(i-1, fade, (i == activeweapon), i);
+                	        x *= 2;
+                	}
+		}
+
 		// draw gametype specific icons
 		if(gametype == GAME_KEYHUNT)
 			CSQC_kh_hud();



More information about the nexuiz-commits mailing list