]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changed server to not send pingplreport in response to "ping" command,
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 May 2007 17:05:10 +0000 (17:05 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 23 May 2007 17:05:10 +0000 (17:05 +0000)
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
sbar.c

index 165705b2ea58d8b53fd5929a4c385a8e2e92f5aa..62d082419546294ede9781612e0e78a3c7ab977a 100644 (file)
@@ -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 fa2fd15f1daef9e640ebcdeda88933305f10f48d..28cae4d601e6ae49fbc854d020d41476d2eaadbe 100644 (file)
--- 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");
                }