r2821 - branches/nexuiz-2.0/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Oct 10 12:26:14 EDT 2007


Author: div0
Date: 2007-10-10 12:26:13 -0400 (Wed, 10 Oct 2007)
New Revision: 2821

Modified:
   branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
Log:
shtest merge


Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2007-10-10 16:24:30 UTC (rev 2820)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2007-10-10 16:26:13 UTC (rev 2821)
@@ -14,6 +14,10 @@
 .float lastflags;
 .float lastground;
 
+#define SHTEST_DELTA 15
+.float shtest_next;
+.float shtest_accumulator;
+
 /*
 =============
 PlayerJump
@@ -106,9 +110,25 @@
 void SV_PlayerPhysics()
 {
 	local vector wishvel, wishdir, v;
-	local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod;
+	local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod, shtest_score;
 	string temps;
 
+	if(time > self.shtest_next)
+	{
+		if(self.shtest_next > 0)
+		{
+			// self.shtest_accumulator:
+			//   started at time - SHTEST_DELTA
+			//   should be at SHTEST_DELTA
+			shtest_score = self.shtest_accumulator / SHTEST_DELTA;
+			if(shtest_score > 1.2)
+				dprint("TIME PARADOX: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
+		}
+		self.shtest_next = time + SHTEST_DELTA;
+		self.shtest_accumulator = 0;
+	}
+	self.shtest_accumulator += frametime;
+
 	if (clienttype(self) == CLIENTTYPE_BOT)
 		bot_think();
 




More information about the nexuiz-commits mailing list