r4030 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 5 12:26:46 EDT 2008


Author: div0
Date: 2008-08-05 12:26:45 -0400 (Tue, 05 Aug 2008)
New Revision: 4030

Modified:
   trunk/data/qcsrc/server/cl_physics.qc
Log:
turn off landing sounds under some conditions (e.g. water, hook)


Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc	2008-08-05 16:20:27 UTC (rev 4029)
+++ trunk/data/qcsrc/server/cl_physics.qc	2008-08-05 16:26:45 UTC (rev 4030)
@@ -234,19 +234,22 @@
 	}
 
 	if(self.flags & FL_ONGROUND)
-		if not(self.lastflags & FL_ONGROUND)
+	if not(self.lastflags & FL_ONGROUND)
+	if(self.waterlevel < 2)
+	if(time >= self.ladder_time)
+	if not(self.hook)
+	{
+		self.nextstep = time + 0.3 + random() * 0.1;
+		trace_dphitq3surfaceflags = 0;
+		tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);
+		if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
 		{
-			self.nextstep = time + 0.3 + random() * 0.1;
-			trace_dphitq3surfaceflags = 0;
-			tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);
-			if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
-			{
-				if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
-					GlobalSound(globalsound_metalfall, CHAN_AUTO, 0);
-				else
-					GlobalSound(globalsound_fall, CHAN_AUTO, 0);
-			}
+			if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
+				GlobalSound(globalsound_metalfall, CHAN_AUTO, 0);
+			else
+				GlobalSound(globalsound_fall, CHAN_AUTO, 0);
 		}
+	}
 
 	if(self.classname == "player")
 	{




More information about the nexuiz-commits mailing list