diff --git a/qw/include/net.h b/qw/include/net.h index b59f1230d..bbc47d090 100644 --- a/qw/include/net.h +++ b/qw/include/net.h @@ -127,6 +127,7 @@ void Netchan_OutOfBand (netadr_t adr, int length, byte *data); void Netchan_OutOfBandPrint (netadr_t adr, char *format, ...) __attribute__((format(printf,2,3))); qboolean Netchan_Process (netchan_t *chan); void Netchan_Setup (netchan_t *chan, netadr_t adr, int qport); +void Netchan_AckPacket (netchan_t *chan); qboolean Netchan_CanPacket (netchan_t *chan); qboolean Netchan_CanReliable (netchan_t *chan); diff --git a/qw/source/cl_parse.c b/qw/source/cl_parse.c index bc5fb9753..1b80a2a71 100644 --- a/qw/source/cl_parse.c +++ b/qw/source/cl_parse.c @@ -269,6 +269,8 @@ Model_NextDownload (void) return; // started a download } + Netchan_AckPacket (&cls.netchan); + for (i = 1; i < MAX_MODELS; i++) { if (!cl.model_name[i][0]) break; @@ -329,6 +331,8 @@ Sound_NextDownload (void) return; // started a download } + Netchan_AckPacket (&cls.netchan); + for (i = 1; i < MAX_SOUNDS; i++) { if (!cl.sound_name[i][0]) break; diff --git a/qw/source/cl_skin.c b/qw/source/cl_skin.c index f3413ce46..3250b07d3 100644 --- a/qw/source/cl_skin.c +++ b/qw/source/cl_skin.c @@ -79,6 +79,8 @@ Skin_NextDownload (void) return; // started a download } + Netchan_AckPacket (&cls.netchan); + cls.downloadtype = dl_none; // now load them in for real diff --git a/qw/source/net_chan.c b/qw/source/net_chan.c index 48c85ea3a..ed4b3f56b 100644 --- a/qw/source/net_chan.c +++ b/qw/source/net_chan.c @@ -451,3 +451,14 @@ Netchan_Process (netchan_t *chan) return true; } + +/* + Netchan_AckPacket + + Send a nop packet so that any unacked reliable packets get acked. +*/ +void +Netchan_AckPacket (netchan_t *chan) +{ + Netchan_Transmit (chan, 1, (byte*)"\001"); +}