r2333 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Apr 17 18:01:54 EDT 2007


Author: kadaverjack
Date: 2007-04-17 18:01:48 -0400 (Tue, 17 Apr 2007)
New Revision: 2333

Modified:
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/w_uzi.qc
Log:
- fixed hitsounds when spectating bots
- display uzi flash for spectators


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2007-04-17 07:44:48 UTC (rev 2332)
+++ trunk/data/qcsrc/server/g_world.qc	2007-04-17 22:01:48 UTC (rev 2333)
@@ -1930,12 +1930,16 @@
 void EndFrame()
 {
 	FOR_EACH_REALCLIENT(self)
+	{
 		if(self.classname == "spectator")
-			self.hitsound += self.enemy.hitsound;
-	FOR_EACH_REALCLIENT(self)
+			self.hitsound = self.enemy.hitsound;
 		if(self.hitsound)
 		{
 			stuffcmd(self, "play2 misc/hit.wav\n");
 			self.hitsound = FALSE;
 		}
+	}
+	FOR_EACH_CLIENT(self)
+			if(clienttype(self) == CLIENTTYPE_BOT)
+				self.hitsound = FALSE;
 }

Modified: trunk/data/qcsrc/server/w_uzi.qc
===================================================================
--- trunk/data/qcsrc/server/w_uzi.qc	2007-04-17 07:44:48 UTC (rev 2332)
+++ trunk/data/qcsrc/server/w_uzi.qc	2007-04-17 22:01:48 UTC (rev 2333)
@@ -27,16 +27,18 @@
 
 	// muzzle flash for 1st person view
 	flash = spawn();
-	setorigin(flash, '53 5 -1');
+	setorigin(flash, '53 5 0');
 	setmodel(flash, "models/uziflash.md3");
 	setattachment(flash, self.weaponentity, "bone01");
+	flash.owner = self;
 	flash.viewmodelforclient = self;
+	flash.customizeentityforclient = CL_Weaponentity_CustomizeEntityForClient;
 	flash.scale = 1.2;
 	SUB_SetFade(flash, time, 0.2);
 
 	// muzzle flash for 3rd person view
 	flash2 = spawn();
-	setorigin(flash2, '51 1 8');
+	setorigin(flash2, '43 1 8');
 	setmodel(flash2, "models/uziflash.md3");
 	setattachment(flash2, self.exteriorweaponentity, "");
 	SUB_SetFade(flash2, time, 0.2);




More information about the nexuiz-commits mailing list