diff --git a/include/net.h b/include/net.h index 9294a8f..0b87f46 100644 --- a/include/net.h +++ b/include/net.h @@ -126,6 +126,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/source/cl_parse.c b/source/cl_parse.c index 7c1e883..bab35ff 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -273,6 +273,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; @@ -334,6 +336,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/source/net_chan.c b/source/net_chan.c index 246a2c8..f71bd26 100644 --- a/source/net_chan.c +++ b/source/net_chan.c @@ -448,3 +448,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"); +} diff --git a/source/skin.c b/source/skin.c index e7c897b..11eb235 100644 --- a/source/skin.c +++ b/source/skin.c @@ -210,6 +210,8 @@ Skin_NextDownload (void) return; // started a download } + Netchan_AckPacket (&cls.netchan); + cls.downloadtype = dl_none; // now load them in for real