mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
make sure that the reliable packets from soundlist, modellist and the skins
info get acked. This is done by sending a no-op packet (0 byte didn't work because the runt packet detector throws them out before the ack is seen).
This commit is contained in:
parent
3c66182588
commit
d441a61bf3
4 changed files with 18 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue