[Bug 3966] New: Ping in the server list is always off by one frame
bugzilla-daemon at icculus.org
bugzilla-daemon at icculus.org
Thu Feb 12 08:25:05 EST 2009
http://bugzilla.icculus.org/show_bug.cgi?id=3966
Summary: Ping in the server list is always off by one frame
Product: Quake 3
Version: SVN HEAD
Platform: PC
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: Misc
AssignedTo: zakk at icculus.org
ReportedBy: amanieu at gmail.com
QAContact: quake3-bugzilla at icculus.org
getinfo response packets (used for ping) are handled at the beginning of the
common frame, but before the client frame. Therefore cls.realtime is still set
to the time of the previous frame. When the packet is handled, the time is
compared to cls.realtime, which is of course off by one frame. This is the
cause of the strange 1 ping servers on the server list. Patch:
--- trunk/src/client/cl_main.c 2009/02/12 00:41:12 306
+++ trunk/src/client/cl_main.c 2009/02/12 13:15:20 307
@@ -3687,6 +3687,7 @@
char info[MAX_INFO_STRING];
char *infoString;
int prot;
+ int realmsec = Sys_Milliseconds();
infoString = MSG_ReadString( msg );
@@ -3703,7 +3704,7 @@
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;
+ cl_pinglist[i].time = realmsec - cl_pinglist[i].start +
1;
Com_DPrintf( "ping time %dms from %s\n",
cl_pinglist[i].time, NET_AdrToString( from ) );
// save of info
--
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the quake3-bugzilla
mailing list