From 8fd46ab57860fedaa814468d3bcd9a2394f3a05e Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Thu, 6 Dec 2001 07:20:32 +0000 Subject: [PATCH] - 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. :) --- qw/source/cl_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index b18ae6546..0a99788eb 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -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; }