From 9a72375ef789be4c1bd5edf8f1cd2af5303b69be Mon Sep 17 00:00:00 2001 From: zakk Date: Sat, 4 Jul 2009 19:43:13 +0000 Subject: Fix for bad ping times, see bug 3966 but note that this patch is different, got a fresh one from Amanieu in irc. git-svn-id: svn://svn.icculus.org/quake3/trunk@1580 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/client/cl_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index b4d3d9b..ac50fb6 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -3365,7 +3365,10 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) { 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 -- cgit v1.2.3