From 8ad2b013efef9a9f4dbb2abe52839dc30d232506 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 23 May 2007 17:05:10 +0000 Subject: [PATCH] changed server to not send pingplreport in response to "ping" command, because it confuses non-DP clients and older DP clients (resulting in the message "unknown command pingplreport" flooding the console) changed client to send "pings" command to DP7 protocol servers so that it gets only the pingplreport output, avoiding any potential misparsing of ping reports and reducing bandwidth a little. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7349 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 3 ++- sbar.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/host_cmd.c b/host_cmd.c index 165705b2..62d08241 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -230,7 +230,8 @@ void Host_Ping_f (void) } // now call the Pings command also, which will send a report that contains packet loss for the scoreboard (as well as a simpler ping report) - Host_Pings_f(); + // actually, don't, it confuses old clients (resulting in "unknown command pingplreport" flooding the console) + //Host_Pings_f(); } /* diff --git a/sbar.c b/sbar.c index fa2fd15f..28cae4d6 100644 --- a/sbar.c +++ b/sbar.c @@ -1505,7 +1505,7 @@ void Sbar_DeathmatchOverlay (void) MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd); MSG_WriteString(&cls.netcon->message, "pings"); } - else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6 || cls.protocol == PROTOCOL_DARKPLACES7) + else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6/* || cls.protocol == PROTOCOL_DARKPLACES7*/) { // these servers usually lack the pings command and so a less efficient "ping" command must be sent, which on modern DP servers will also reply with a pingplreport command after the ping listing static int ping_anyway_counter = 0; @@ -1525,7 +1525,7 @@ void Sbar_DeathmatchOverlay (void) } else { - // newer server definitely has pings command, so use it for more efficiency + // newer server definitely has pings command, so use it for more efficiency, avoids ping reports spamming the console if they are misparsed, and saves a little bandwidth MSG_WriteByte(&cls.netcon->message, clc_stringcmd); MSG_WriteString(&cls.netcon->message, "pings"); } -- 2.39.2