aboutsummaryrefslogtreecommitdiffstats
path: root/code/client
diff options
context:
space:
mode:
Diffstat (limited to 'code/client')
-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