mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
pre-initialize chan->incoming_sequence to -1 so a packet with an incoming
sequence of 0 will work
This commit is contained in:
parent
d1bef3bf8c
commit
2d8923eaf5
1 changed files with 2 additions and 1 deletions
|
@ -195,6 +195,7 @@ Netchan_Setup (netchan_t *chan, netadr_t adr, int qport, int flags)
|
|||
|
||||
chan->remote_address = adr;
|
||||
chan->last_received = *net_realtime;
|
||||
chan->incoming_sequence = -1;
|
||||
|
||||
chan->message.data = chan->message_buf;
|
||||
chan->message.allowoverflow = true;
|
||||
|
@ -384,7 +385,7 @@ Netchan_Process (netchan_t *chan)
|
|||
#endif
|
||||
|
||||
// discard stale or duplicated packets
|
||||
if (sequence <= (unsigned int) chan->incoming_sequence) {
|
||||
if (sequence < (unsigned int) chan->incoming_sequence + 1) {
|
||||
if (showdrop->int_val)
|
||||
Con_Printf ("%s:Out of order packet %i at %i\n",
|
||||
NET_AdrToString (chan->remote_address), sequence,
|
||||
|
|
Loading…
Reference in a new issue