r4760 - in trunk/data: . gfx qcsrc/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Oct 15 01:54:29 EDT 2008


Author: div0
Date: 2008-10-15 01:54:29 -0400 (Wed, 15 Oct 2008)
New Revision: 4760

Modified:
   trunk/data/build-compat-pack.sh
   trunk/data/gfx/sb_playercolor_base.tga
   trunk/data/gfx/sb_playercolor_pants.tga
   trunk/data/gfx/sb_playercolor_shirt.tga
   trunk/data/nexuiz-credits.txt
   trunk/data/qcsrc/client/main.qh
   trunk/data/qcsrc/client/sbar.qc
Log:
MirceaKitsune's color icons, and code to put them in front of the player name


Modified: trunk/data/build-compat-pack.sh
===================================================================
--- trunk/data/build-compat-pack.sh	2008-10-14 19:44:46 UTC (rev 4759)
+++ trunk/data/build-compat-pack.sh	2008-10-15 05:54:29 UTC (rev 4760)
@@ -22,6 +22,9 @@
 	gfx/runningman_mini.tga
 	gfx/sb_kh_full.tga
 	gfx/sb_kh_outline.tga
+	gfx/sb_playercolor_base.tga
+	gfx/sb_playercolor_shirt.tga
+	gfx/sb_playercolor_pants.tga
 	gfx/silvercity_mini.tga
 	gfx/stormkeep_mini.tga
 	gfx/strength_mini.tga

Modified: trunk/data/gfx/sb_playercolor_base.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/sb_playercolor_pants.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/sb_playercolor_shirt.tga
===================================================================
(Binary files differ)

Modified: trunk/data/nexuiz-credits.txt
===================================================================
--- trunk/data/nexuiz-credits.txt	2008-10-14 19:44:46 UTC (rev 4759)
+++ trunk/data/nexuiz-credits.txt	2008-10-15 05:54:29 UTC (rev 4760)
@@ -131,3 +131,4 @@
 Christian Ice
 FruitieX
 Edward "Ed" Holness
+MirceaKitsune

Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh	2008-10-14 19:44:46 UTC (rev 4759)
+++ trunk/data/qcsrc/client/main.qh	2008-10-15 05:54:29 UTC (rev 4760)
@@ -74,8 +74,7 @@
 #define SP_KDRATIO -4
 #define SP_CLRATIO -5
 #define SP_PL -6
-#define SP_COLOR -7
-#define SP_FRAGS -8
+#define SP_FRAGS -7
 
 #define SP_SEPARATOR -100
 

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2008-10-14 19:44:46 UTC (rev 4759)
+++ trunk/data/qcsrc/client/sbar.qc	2008-10-15 05:54:29 UTC (rev 4760)
@@ -452,11 +452,6 @@
 			sbar_field[sbar_num_fields] = SP_PL;
 		} else if(str == "kd" || str == "kdr" || str == "kdratio" || str == "k/d") {
 			sbar_field[sbar_num_fields] = SP_KDRATIO;
-		} else if(str == "color") {
-			if(!teamplay)
-				sbar_field[sbar_num_fields] = SP_COLOR;
-			else
-				continue; // can't put this column in teamplay, it is redundant and stupid
 		} else if(str == "name" || str == "nick") {
 			sbar_field[sbar_num_fields] = SP_NAME;
 			sbar_size[sbar_num_fields] = MIN_NAMELEN; // minimum size? any use?
@@ -611,6 +606,15 @@
 			return str;
 		
 		case SP_NAME:
+			if(teamplay)
+			{
+				f = stof(getplayerkey(pl.sv_entnum, "colors"));
+				sbar_field_icon0 = "gfx/sb_playercolor_base";
+				sbar_field_icon1 = "gfx/sb_playercolor_shirt";
+				sbar_field_icon1_rgb = colormapPaletteColor(floor(f / 16), 0);
+				sbar_field_icon2 = "gfx/sb_playercolor_pants";
+				sbar_field_icon2_rgb = colormapPaletteColor(mod(f, 16), 1);
+			}
 			return getplayerkey(pl.sv_entnum, "name");
 
 		case SP_FRAGS:
@@ -618,15 +622,6 @@
 			f -= pl.(scores[SP_SUICIDES]);
 			return ftos(f);
 
-		case SP_COLOR:
-			f = stof(getplayerkey(pl.sv_entnum, "colors"));
-			sbar_field_icon0 = "gfx/sb_playercolor_base";
-			sbar_field_icon1 = "gfx/sb_playercolor_shirt";
-			sbar_field_icon1_rgb = colormapPaletteColor(floor(f / 16), 0);
-			sbar_field_icon2 = "gfx/sb_playercolor_pants";
-			sbar_field_icon2_rgb = colormapPaletteColor(mod(f, 16), 1);
-			return "";
-
 		case SP_KDRATIO:
 			num = pl.(scores[SP_KILLS]);
 			denom = pl.(scores[SP_DEATHS]);




More information about the nexuiz-commits mailing list