- parse A2A_ACK in with normal connectionless packets

- only parse A2A_ACK packets missing the connectionless prefix if the
  packet is 1 or 2 bytes long.  if longer it gets treated as a normal
  sequenced packet

The packetloss on localhost bug (except during connect) is now gone. :)
This commit is contained in:
Adam Olsen 2001-12-06 07:20:32 +00:00
parent 12cb517f84
commit 8fd46ab578

View file

@ -962,6 +962,9 @@ CL_ConnectionlessPacket (void)
NET_SendPacket (6, &data, net_from);
return;
}
if (c == A2A_ACK) {
SL_CheckPing (NET_AdrToString (net_from));
}
if (c == S2C_CHALLENGE) {
Con_Printf ("challenge\n");
@ -1010,8 +1013,10 @@ CL_ReadPackets (void)
CL_ConnectionlessPacket ();
continue;
}
if (*(char *) net_message->message->data == A2A_ACK)
{
if ((net_message->message->cursize == 1
|| net_message->message->cursize == 2)
&& *(char *) net_message->message->data == A2A_ACK) {
// XXX This is a hack for the broken protocol
SL_CheckPing (NET_AdrToString (net_from));
continue;
}