mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-01 07:02:11 +00:00
Fix compile issues
This commit is contained in:
parent
7090cf16b4
commit
9bc3acd17a
3 changed files with 10 additions and 5 deletions
|
@ -1374,8 +1374,6 @@ static boolean CL_SendJoin(void)
|
|||
netbuffer->u.clientcfg.challengenum = cl_challengenum;
|
||||
memcpy(netbuffer->u.clientcfg.challengeanswer, cl_challengeanswer, MD5_LEN);
|
||||
|
||||
nodes[servernode].flags &= ~NF_CLOSE; // Hell if I know.
|
||||
|
||||
return HSendPacket(servernode, true, 0, sizeof (clientconfig_pak));
|
||||
}
|
||||
|
||||
|
@ -3832,9 +3830,6 @@ static void HandleConnect(SINT8 node)
|
|||
}
|
||||
}
|
||||
|
||||
// The connecting node may be
|
||||
nodes[node].flags &= ~NF_CLOSE;
|
||||
|
||||
if (netbuffer->u.clientcfg.needsdownload)
|
||||
{
|
||||
netbuffer->packettype = PT_DOWNLOADFILESOKAY;
|
||||
|
|
|
@ -1110,6 +1110,10 @@ boolean HSendPacket(INT32 node, boolean reliable, UINT8 acknum, size_t packetlen
|
|||
netbuffer->checksum = NetbufferChecksum();
|
||||
sendbytes += packetheaderlength + doomcom->datalength; // For stat
|
||||
|
||||
// Joinpasswords close nodes, this may try to send to a waiting-to-close node, so cancel closing?
|
||||
if (netbuffer->packettype == PT_CLIENTJOIN)
|
||||
nodes[node].flags &= ~NF_CLOSE;
|
||||
|
||||
#ifdef PACKETDROP
|
||||
// Simulate internet :)
|
||||
//if (rand() >= (INT32)(RAND_MAX * (PACKETLOSSRATE / 100.f)))
|
||||
|
@ -1191,6 +1195,10 @@ boolean HGetPacket(void)
|
|||
SV_AbortSendFiles(doomcom->remotenode);
|
||||
}
|
||||
|
||||
// Joinpasswords close nodes, this may receive from a waiting-to-close node, so cancel closing?
|
||||
if (netbuffer->packettype == PT_CLIENTJOIN)
|
||||
nodes[doomcom->remotenode].flags &= ~NF_CLOSE;
|
||||
|
||||
getbytes += packetheaderlength + doomcom->datalength; // For stat
|
||||
|
||||
if (doomcom->remotenode >= MAXNETNODES)
|
||||
|
|
|
@ -508,6 +508,8 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void SOCK_FreeNodenum(INT32 numnode);
|
||||
|
||||
// This is a hack. For some reason, nodes aren't being freed properly.
|
||||
// This goes through and cleans up what nodes were supposed to be freed.
|
||||
/** \warning This function causes the file downloading to stop if someone joins.
|
||||
|
|
Loading…
Reference in a new issue