mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-31 23:00:57 +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
11
src/d_net.c
11
src/d_net.c
|
@ -1146,7 +1146,7 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
||||||
//
|
//
|
||||||
boolean HGetPacket(void)
|
boolean HGetPacket(void)
|
||||||
{
|
{
|
||||||
//boolean nodejustjoined;
|
boolean nodejustjoined;
|
||||||
|
|
||||||
// Get a packet from self
|
// Get a packet from self
|
||||||
if (rebound_tail != rebound_head)
|
if (rebound_tail != rebound_head)
|
||||||
|
@ -1173,11 +1173,16 @@ boolean HGetPacket(void)
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
//nodejustjoined = I_NetGet();
|
nodejustjoined = I_NetGet();
|
||||||
I_NetGet();
|
//I_NetGet();
|
||||||
|
|
||||||
if (doomcom->remotenode == -1) // No packet received
|
if (doomcom->remotenode == -1) // No packet received
|
||||||
|
{
|
||||||
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
getbytes += packetheaderlength + doomcom->datalength; // For stat
|
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
|
// 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
|
// find a free slot
|
||||||
j = getfreenode();
|
j = getfreenode();
|
||||||
if (j > 0)
|
if (j > 0)
|
||||||
|
@ -650,7 +657,11 @@ static boolean SOCK_Get(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DEBFILE("New node detected: No more free slots\n");
|
DEBFILE("New node detected: No more free slots\n");
|
||||||
|
doomcom->remotenode = -1; // no packet
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue