From 0cbb3132e6612486d583c5ec08c6c6aaa8b95a01 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 22 Apr 2015 22:35:38 -0500 Subject: [PATCH] Don't spam Dropped packet messages for disconnected players --- src/i_net.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i_net.cpp b/src/i_net.cpp index d3958e1e1..5957846d2 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -319,7 +319,11 @@ void PacketGet (void) } else if (c > 0) { //The packet is not from any in-game node, so we might as well discard it. - Printf("Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port); + // Don't show the message for disconnect notifications. + if (c != 2 || TransmitBuffer[0] != PRE_FAKE || TransmitBuffer[1] != PRE_DISCONNECT) + { + DPrintf("Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port); + } doomcom.remotenode = -1; return; }