mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Wacky attempt at not reopening nodes for D/Ced ackreting clients
This commit is contained in:
parent
32fd6dc834
commit
8c56f1aa0b
2 changed files with 20 additions and 4 deletions
13
src/d_net.c
13
src/d_net.c
|
@ -1146,7 +1146,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
|||
//
|
||||
boolean HGetPacket(void)
|
||||
{
|
||||
//boolean nodejustjoined;
|
||||
boolean nodejustjoined;
|
||||
|
||||
// Get a packet from self
|
||||
if (rebound_tail != rebound_head)
|
||||
|
@ -1173,11 +1173,16 @@ boolean HGetPacket(void)
|
|||
|
||||
while(true)
|
||||
{
|
||||
//nodejustjoined = I_NetGet();
|
||||
I_NetGet();
|
||||
nodejustjoined = I_NetGet();
|
||||
//I_NetGet();
|
||||
|
||||
if (doomcom->remotenode == -1) // No packet received
|
||||
return false;
|
||||
{
|
||||
if (nodejustjoined) // _This_ means we did receive a packet, but either from a node we couldn't allocate or a gone player ackreting...
|
||||
continue;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
getbytes += packetheaderlength + doomcom->datalength; // For stat
|
||||
|
||||
|
|
11
src/i_tcp.c
11
src/i_tcp.c
|
@ -624,6 +624,13 @@ static boolean SOCK_Get(void)
|
|||
}
|
||||
// not found
|
||||
|
||||
if (netbuffer->packettype == PT_NOTHING)
|
||||
{
|
||||
DEBFILE(va("Ackret received from disconnected address:%s, ignoring...\n", SOCK_AddrToStr(&fromaddress)));
|
||||
doomcom->remotenode = -1; // no packet
|
||||
return true;
|
||||
}
|
||||
|
||||
// find a free slot
|
||||
j = getfreenode();
|
||||
if (j > 0)
|
||||
|
@ -650,7 +657,11 @@ static boolean SOCK_Get(void)
|
|||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBFILE("New node detected: No more free slots\n");
|
||||
doomcom->remotenode = -1; // no packet
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue