Skip to content

Commit

Permalink
Port NCMD_EXIT to i_net file
Browse files Browse the repository at this point in the history
  • Loading branch information
Boondorl committed Nov 5, 2024
1 parent 4d49953 commit 4409cd1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/engine/i_net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ static SOCKET mysocket = INVALID_SOCKET;
static sockaddr_in sendaddress[MAXNETNODES];
static uint8_t sendplayer[MAXNETNODES];

constexpr int NET_EXIT = 0x80;

#ifdef __WIN32__
const char *neterror (void);
#else
Expand Down Expand Up @@ -306,7 +308,7 @@ void PacketGet (void)
GetPlayerName(node).GetChars());
}

doomcom.data[0] = NCMD_EXIT;
doomcom.data[0] = NET_EXIT;
c = 1;
}
else if (err != WSAEWOULDBLOCK)
Expand Down Expand Up @@ -345,7 +347,7 @@ void PacketGet (void)
else if (c > 0)
{ //The packet is not from any in-game node, so we might as well discard it.
// Don't show the message for disconnect notifications.
if (TransmitBuffer[0] != NCMD_EXIT)
if (TransmitBuffer[0] != NET_EXIT)
{
if (TransmitBuffer[0] != PRE_FAKE)
DPrintf(DMSG_WARNING, "Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port);
Expand Down

0 comments on commit 4409cd1

Please sign in to comment.