r2820 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Oct 10 12:24:32 EDT 2007
Author: div0
Date: 2007-10-10 12:24:30 -0400 (Wed, 10 Oct 2007)
New Revision: 2820
Modified:
trunk/data/qcsrc/server/cl_physics.qc
Log:
added a "shtest" (not sure how well it is working, so it is just a debug message for now)
Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc 2007-10-07 14:43:43 UTC (rev 2819)
+++ trunk/data/qcsrc/server/cl_physics.qc 2007-10-10 16:24:30 UTC (rev 2820)
@@ -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