[nexuiz-commits] r7720 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Sep 11 02:41:07 EDT 2009


Author: div0
Date: 2009-09-11 02:41:06 -0400 (Fri, 11 Sep 2009)
New Revision: 7720

Modified:
   trunk/data/qcsrc/server/antilag.qc
   trunk/data/qcsrc/server/cl_client.qc
   trunk/data/qcsrc/server/g_world.qc
Log:
more antilag fixes


Modified: trunk/data/qcsrc/server/antilag.qc
===================================================================
--- trunk/data/qcsrc/server/antilag.qc	2009-09-11 00:50:08 UTC (rev 7719)
+++ trunk/data/qcsrc/server/antilag.qc	2009-09-11 06:41:06 UTC (rev 7720)
@@ -60,7 +60,11 @@
 
 	i0 = antilag_find(e, t);
 	if(i0 < 0)
-		return e.origin;
+	{
+		i0 = e.antilag_index - 1;
+		if(i0 < 0)
+			i0 = ANTILAG_MAX_ORIGINS - 1;
+	}
 	i1 = i0 + 1;
 	if(i1 >= ANTILAG_MAX_ORIGINS)
 		i1 = 0;

Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc	2009-09-11 00:50:08 UTC (rev 7719)
+++ trunk/data/qcsrc/server/cl_client.qc	2009-09-11 06:41:06 UTC (rev 7720)
@@ -2802,9 +2802,6 @@
 		self.idlekick_lasttimeleft = timeleft;
 	}
 
-	if(frametime)
-		antilag_record(self, time + frametime);
-
 #ifdef TETRIS
 	if(self.impulse == 100)
 		ImpulseCommands();

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2009-09-11 00:50:08 UTC (rev 7719)
+++ trunk/data/qcsrc/server/g_world.qc	2009-09-11 06:41:06 UTC (rev 7720)
@@ -2511,6 +2511,11 @@
 	{
 		self.hitsound = FALSE;
 		self.typehitsound = FALSE;
+		antilag_record(self, time + 2*frametime);
+		// add 1 frametime because after this, engine SV_Physics
+		// increases time by a frametime and then networks the frame
+		// add another frametime because client shows everything with
+		// 1 frame of lag (cl_nolerp 0).
 	}
 }
 



More information about the nexuiz-commits mailing list