[nexuiz-commits] r7082 - in trunk/data: . qcsrc/client qcsrc/menu/nexuiz qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jun 23 15:12:21 EDT 2009


Author: div0
Date: 2009-06-23 15:12:20 -0400 (Tue, 23 Jun 2009)
New Revision: 7082

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/client/Defs.qc
   trunk/data/qcsrc/client/View.qc
   trunk/data/qcsrc/client/sbar.qc
   trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
   trunk/data/qcsrc/server/w_electro.qc
   trunk/data/qcsrc/server/w_grenadelauncher.qc
Log:
directhit fix;
currentammo;
scoring sliders fix


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/defaultNexuiz.cfg	2009-06-23 19:12:20 UTC (rev 7082)
@@ -212,6 +212,7 @@
 vid_conheight 600
 set sbar_hudselector 1	"0 = old style hud layout, 1 = new nexuiz hud layout, 2 = combined health and armor display"
 set sbar_hud_accuracy 0 "1 = weapon accuracy on HUD"
+set sbar_showcurrentammo 0 "set to 1 to see only the ammo of the current ammo or 0 to see all 4 ammo counts"
 v_deathtilt 0 // needed for spectators (who are dead to avoid prediction)
 sbar_info_pos 50
 

Modified: trunk/data/qcsrc/client/Defs.qc
===================================================================
--- trunk/data/qcsrc/client/Defs.qc	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/client/Defs.qc	2009-06-23 19:12:20 UTC (rev 7082)
@@ -151,6 +151,7 @@
 float		intermission;
 float		sb_showscores;
 float		sb_showaccuracy;
+float		sbar_currentammo;
 .string		message;
 .float renderflags;
 // float		coop;

Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/client/View.qc	2009-06-23 19:12:20 UTC (rev 7082)
@@ -361,6 +361,7 @@
 	}
 
 	sbar_alpha_fg = cvar("sbar_alpha_fg" );
+	sbar_currentammo = cvar("sbar_showcurrentammo");
 	sbar_hudselector = cvar("sbar_hudselector");
 	sbar_hud_accuracy = cvar("sbar_hud_accuracy");
 	ColorTranslateMode = cvar("cl_stripcolorcodes");

Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/client/sbar.qc	2009-06-23 19:12:20 UTC (rev 7082)
@@ -2345,32 +2345,64 @@
 
 				for (i = 0; i < 4; ++i) {
 					a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i?
-
-					if (a > 0) {
+					
+					if(sbar_currentammo)
+					{
 						pos = '0 0 0';
-						if (cvar("vid_conwidth") >= 800)
-							switch (i) {
-								case 0: pos_x = 114; pos_y = -48; break; // shells
-								case 1: pos_x = 114; pos_y = -26; break; // bullets
-								case 2: pos_x = 200; pos_y = -48; break; // rockets
-								case 3: pos_x = 200; pos_y = -26; break; // cells
+						if (stat_items & GetAmmoItemCode(i))
+						{
+							if(cvar("vid_conwidth") >= 800)
+							{
+								pos_x = 170;
+								pos_y = -40;
+								drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '107 29 0', '1 1 1', sbar_alpha_fg, 0);
+								drawpic(bottomleft + pos + '76 3 0', GetAmmoPicture(i), '24 24 0', '1 1 1', sbar_alpha_fg, 0);
+								if(a > 10)
+									Sbar_DrawXNum(bottomleft + pos + '5 4 0', a, 3, 24, '0.6 0.7 0.8', 0, 1, 0);
+								else
+									Sbar_DrawXNum(bottomleft + pos + '5 4 0', a, 3, 24, '0.7 0 0', 0, 1, 0);
 							}
-						else // if vid_conwidth is lower than 800, ammo will overlap with weapon icons and health so we'll move it to the right
-							switch (i) {
-								case 0: pos_x = vid_conwidth - 158; pos_y = -150; break; // shells
-								case 1: pos_x = vid_conwidth - 158; pos_y = -128; break; // bullets
-								case 2: pos_x = vid_conwidth - 84; pos_y = -150; break; // rockets
-								case 3: pos_x = vid_conwidth - 84; pos_y = -128; break; // cells
+							else
+							{
+								pos_x = vid_conwidth - 110;
+								pos_y = -128;
+								drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '107 29 0', '1 1 1', sbar_alpha_fg, 0);
+								drawpic(bottomleft + pos + '76 3 0', GetAmmoPicture(i), '24 24 0', '1 1 1', sbar_alpha_fg, 0);
+								if(a > 10)
+									Sbar_DrawXNum(bottomleft + pos + '5 4 0', a, 3, 24, '0.6 0.7 0.8', 0, 1, 0);
+								else
+									Sbar_DrawXNum(bottomleft + pos + '5 4 0', a, 3, 24, '0.7 0 0', 0, 1, 0);
 							}
-
-						if (stat_items & GetAmmoItemCode(i))
-							drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '80 22 0', '1 1 1', sbar_alpha_fg, 0);
-						drawpic(bottomleft + pos + '56 3 0', GetAmmoPicture(i), '18 18 0', '1 1 1', sbar_alpha_fg, 0);
-						if (a > 10)
-							Sbar_DrawXNum(bottomleft + pos + '6 4 0', a, 3, 16, '0.6 0.7 0.8', 0, 1, 0);
-						else
-							Sbar_DrawXNum(bottomleft + pos + '6 4 0', a, 3, 16, '0.7 0 0', 0, 1, 0);
+						}
 					}
+					else
+					{
+						if (a > 0) {
+							pos = '0 0 0';
+							if (cvar("vid_conwidth") >= 800)
+								switch (i) {
+									case 0: pos_x = 114; pos_y = -48; break; // shells
+									case 1: pos_x = 114; pos_y = -26; break; // bullets
+									case 2: pos_x = 200; pos_y = -48; break; // rockets
+									case 3: pos_x = 200; pos_y = -26; break; // cells
+								}
+							else // if vid_conwidth is lower than 800, ammo will overlap with weapon icons and health so we'll move it to the right
+								switch (i) {
+									case 0: pos_x = vid_conwidth - 158; pos_y = -150; break; // shells
+									case 1: pos_x = vid_conwidth - 158; pos_y = -128; break; // bullets
+									case 2: pos_x = vid_conwidth - 84; pos_y = -150; break; // rockets
+									case 3: pos_x = vid_conwidth - 84; pos_y = -128; break; // cells
+								}
+					
+							if (stat_items & GetAmmoItemCode(i))
+								drawpic(bottomleft + pos + '0 1.5 0', "gfx/hud/sb_ammobg", '80 22 0', '1 1 1', sbar_alpha_fg, 0);
+							drawpic(bottomleft + pos + '56 3 0', GetAmmoPicture(i), '18 18 0', '1 1 1', sbar_alpha_fg, 0);
+							if (a > 10)
+								Sbar_DrawXNum(bottomleft + pos + '6 4 0', a, 3, 16, '0.6 0.7 0.8', 0, 1, 0);
+							else
+								Sbar_DrawXNum(bottomleft + pos + '6 4 0', a, 3, 16, '0.7 0 0', 0, 1, 0);
+						}
+					}
 				}
 
 				// fuel ammo

Modified: trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-06-23 19:12:20 UTC (rev 7082)
@@ -200,13 +200,13 @@
 	l2 = me.checkboxFraglimitMapinfo;
 	switch(gt)
 	{
-		case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, l2, "Capture limit:",   2,   20, 10, "capturelimit_override");    break;
+		case MAPINFO_TYPE_CTF:        GameType_ConfigureSliders(e, l, l2, "Capture limit:",   1,   20, 1, "capturelimit_override");     break;
 		case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_domination_point_limit"); break;
 		case MAPINFO_TYPE_KEYHUNT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",   200, 1500, 50, "g_keyhunt_point_limit");    break;
 		case MAPINFO_TYPE_RUNEMATCH:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "g_runematch_point_limit");  break;
 		case MAPINFO_TYPE_LMS:        GameType_ConfigureSliders(e, l, l2, "Lives:",           3,   50,  1, "g_lms_lives_override");     break;
 		case MAPINFO_TYPE_RACE:       GameType_ConfigureSliders(e, l, l2, "Laps:",            1,   25,  1, "g_race_laps_limit");        break;
-		case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, "Goals:",           3,   50,  1, "g_nexball_goallimit");      break;
+		case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, "Goals:",           1,   50,  1, "g_nexball_goallimit");      break;
 		case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
 		case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
 		default:                      GameType_ConfigureSliders(e, l, l2, "Frag limit:",      5,  100,  5, "fraglimit_override");       break;

Modified: trunk/data/qcsrc/server/w_electro.qc
===================================================================
--- trunk/data/qcsrc/server/w_electro.qc	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/server/w_electro.qc	2009-06-23 19:12:20 UTC (rev 7082)
@@ -4,8 +4,9 @@
 	if(other.takedamage == DAMAGE_AIM)
 		if(other.classname == "player")
 			if(IsDifferentTeam(self.owner, other))
-				if(IsFlying(other))
-					announce(self.owner, "announcer/male/electrobitch.wav");
+				if(other.deadflag == DEAD_NO)
+					if(IsFlying(other))
+						announce(self.owner, "announcer/male/electrobitch.wav");
 
 	self.event_damage = SUB_Null;
 	if (self.movetype == MOVETYPE_BOUNCE)

Modified: trunk/data/qcsrc/server/w_grenadelauncher.qc
===================================================================
--- trunk/data/qcsrc/server/w_grenadelauncher.qc	2009-06-23 19:07:24 UTC (rev 7081)
+++ trunk/data/qcsrc/server/w_grenadelauncher.qc	2009-06-23 19:12:20 UTC (rev 7082)
@@ -3,8 +3,9 @@
 	if(other.takedamage == DAMAGE_AIM)
 		if(other.classname == "player")
 			if(IsDifferentTeam(self.owner, other))
-				if(IsFlying(other))
-					announce(self.owner, "announcer/male/airshot.wav");
+				if(other.deadflag == DEAD_NO)
+					if(IsFlying(other))
+						announce(self.owner, "announcer/male/airshot.wav");
 
 	self.event_damage = SUB_Null;
 	RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_primary_damage"), cvar("g_balance_grenadelauncher_primary_edgedamage"), cvar("g_balance_grenadelauncher_primary_radius"), world, cvar("g_balance_grenadelauncher_primary_force"), self.projectiledeathtype, other);



More information about the nexuiz-commits mailing list