Skip to content
Snippets Groups Projects
Commit 5aeb4b59 authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Revert "Loop through rebound packets until you found a good one or ran out of them"

On second thought, this was probably unnecessary anyway.

This reverts commit 1078a642.
parent 1078a642
No related branches found
No related tags found
2 merge requests!252OpenGL: Public flatsprite: The Fixening,!185Netcode hotfix
......@@ -1124,27 +1124,22 @@ boolean HGetPacket(void)
// Get a packet from self
if (rebound_tail != rebound_head)
{
while (true) // loop until we found a valid packet, or we ran out of packets
{ // provided MAXREBOUND is not all that large this shouldn't take too long
if (rebound_tail == rebound_head)
break; // just give up, none of them were any good somehow
M_Memcpy(netbuffer, &reboundstore[rebound_tail], reboundsize[rebound_tail]);
doomcom->datalength = reboundsize[rebound_tail];
if (netbuffer->packettype == PT_NODETIMEOUT)
doomcom->remotenode = netbuffer->u.textcmd[0];
else
doomcom->remotenode = 0;
M_Memcpy(netbuffer, &reboundstore[rebound_tail], reboundsize[rebound_tail]);
doomcom->datalength = reboundsize[rebound_tail];
if (netbuffer->packettype == PT_NODETIMEOUT)
doomcom->remotenode = netbuffer->u.textcmd[0];
else
doomcom->remotenode = 0;
rebound_tail = (rebound_tail+1) % MAXREBOUND;
rebound_tail = (rebound_tail+1) % MAXREBOUND;
if (doomcom->remotenode == -1) // wait hang on what?
continue; // ignore it, look for the next packet
if (doomcom->remotenode == -1) // wait hang on what?
return true; // there might still be packets from others though, so don't return false
#ifdef DEBUGFILE
if (debugfile)
DebugPrintpacket("GETLOCAL");
if (debugfile)
DebugPrintpacket("GETLOCAL");
#endif
return true;
}
return true;
}
if (!netgame)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment