[quake3-commits] r1580 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Jul 4 15:43:14 EDT 2009


Author: zakk
Date: 2009-07-04 15:43:13 -0400 (Sat, 04 Jul 2009)
New Revision: 1580

Modified:
   trunk/code/client/cl_main.c
Log:
Fix for bad ping times, see bug 3966 but note that this patch is different, got a fresh one from 
Amanieu in irc.


Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2009-06-26 18:11:45 UTC (rev 1579)
+++ trunk/code/client/cl_main.c	2009-07-04 19:43:13 UTC (rev 1580)
@@ -3365,7 +3365,10 @@
 		if ( cl_pinglist[i].adr.port && !cl_pinglist[i].time && NET_CompareAdr( from, cl_pinglist[i].adr ) )
 		{
 			// calc ping time
-			cl_pinglist[i].time = cls.realtime - cl_pinglist[i].start + 1;
+			if (cl_pinglist[i].start == cls.realtime)
+				cl_pinglist[i].time = Sys_Milliseconds() - cl_pinglist[i].start + 1;
+			else
+				cl_pinglist[i].time = cls.realtime - cl_pinglist[i].start + 1;
 			Com_DPrintf( "ping time %dms from %s\n", cl_pinglist[i].time, NET_AdrToString( from ) );
 
 			// save of info



More information about the quake3-commits mailing list