aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-07-04 19:43:13 +0000
committerzakk <zakk@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-07-04 19:43:13 +0000
commit9a72375ef789be4c1bd5edf8f1cd2af5303b69be (patch)
treef3b80b510e1d0179e2e7a7c443fce46a10cf624a /code
parent1bfc7abd59141813afbd6d912555f221a417ad0c (diff)
downloadioquake3-aero-9a72375ef789be4c1bd5edf8f1cd2af5303b69be.tar.gz
ioquake3-aero-9a72375ef789be4c1bd5edf8f1cd2af5303b69be.zip
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
Diffstat (limited to 'code')
-rw-r--r--code/client/cl_main.c5
1 files changed, 4 insertions, 1 deletions
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