Fix for bad ping times, see bug 3966 but note that this patch is different, got a fresh one from

Amanieu in irc.
This commit is contained in:
Zachary Slater 2009-07-04 19:43:13 +00:00
parent 9b2b9abd25
commit 20c374e87b

View file

@ -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 ) ) if ( cl_pinglist[i].adr.port && !cl_pinglist[i].time && NET_CompareAdr( from, cl_pinglist[i].adr ) )
{ {
// calc ping time // 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 ) ); Com_DPrintf( "ping time %dms from %s\n", cl_pinglist[i].time, NET_AdrToString( from ) );
// save of info // save of info