r3001 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Dec 6 04:36:34 EST 2007


Author: div0
Date: 2007-12-06 04:36:16 -0500 (Thu, 06 Dec 2007)
New Revision: 3001

Modified:
   trunk/data/qcsrc/server/t_jumppads.qc
Log:
allow custom jumppad sounds using trigger_push.noise


Modified: trunk/data/qcsrc/server/t_jumppads.qc
===================================================================
--- trunk/data/qcsrc/server/t_jumppads.qc	2007-12-06 09:21:33 UTC (rev 3000)
+++ trunk/data/qcsrc/server/t_jumppads.qc	2007-12-06 09:36:16 UTC (rev 3001)
@@ -124,7 +124,7 @@
 		{
 			// flash when activated
 			te_smallflash(other.origin);
-			sound (other, CHAN_ITEM, "misc/jumppad.wav", 1, ATTN_NORM);
+			sound (other, CHAN_ITEM, self.noise, 1, ATTN_NORM);
 			self.pushltime = time + 0.2;
 		}
 		if(clienttype(other) == CLIENTTYPE_REAL)
@@ -236,8 +236,9 @@
 		self.speed = 1000;
 	self.movedir = self.movedir * self.speed * 10;
 
-	if (self.target)
-		precache_sound ("misc/jumppad.wav");
+	if not(self.noise)
+		self.noise = "misc/jumppad.wav";
+	precache_sound (self.noise);
 
 	// this must be called to spawn the teleport waypoints for bots
 	self.think = trigger_push_findtarget;




More information about the nexuiz-commits mailing list