r4440 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 10 02:05:22 EDT 2008
Author: div0
Date: 2008-09-10 02:05:22 -0400 (Wed, 10 Sep 2008)
New Revision: 4440
Modified:
trunk/data/qcsrc/server/cl_physics.qc
Log:
fix a tiny accuracy bug in speedhack detection
Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc 2008-09-09 19:28:16 UTC (rev 4439)
+++ trunk/data/qcsrc/server/cl_physics.qc 2008-09-10 06:05:22 UTC (rev 4440)
@@ -16,7 +16,8 @@
.float wasFlying;
.float spectatorspeed;
-#define SHTEST_DELTA 15
+#define SHTEST_DELTA 10
+#define SHTEST_THRESHOLD 1.1
.float shtest_next;
.float shtest_accumulator;
@@ -144,9 +145,9 @@
// 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");
+ shtest_score = self.shtest_accumulator / (SHTEST_DELTA + time - self.shtest_next);
+ if(shtest_score > SHTEST_THRESHOLD)
+ print("TIME PARADOX: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
else if(cvar("developer_shtest"))
dprint("okay: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
}
More information about the nexuiz-commits
mailing list