mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-02-21 10:41:08 +00:00
Make sending downloads using legacy protocol work with sv_dlRate 1000
Send snapshot with each download block so that client updates reliable acknowledge, otherwise client can error when asking for next block via nextdl reliable command.
This commit is contained in:
parent
188ca86a92
commit
95928708f7
3 changed files with 14 additions and 8 deletions
|
@ -397,6 +397,9 @@ void SV_WriteFrameToClient (client_t *client, msg_t *msg);
|
|||
void SV_SendMessageToClient( msg_t *msg, client_t *client );
|
||||
void SV_SendClientMessages( void );
|
||||
void SV_SendClientSnapshot( client_t *client );
|
||||
#ifdef ELITEFORCE
|
||||
void SV_WriteSnapshotToClient( client_t *client, msg_t *msg );
|
||||
#endif
|
||||
|
||||
//
|
||||
// sv_game.c
|
||||
|
|
|
@ -1259,9 +1259,14 @@ int SV_SendDownloadMessages(void)
|
|||
if(retval)
|
||||
{
|
||||
#ifdef ELITEFORCE
|
||||
if(!msg.compat)
|
||||
if(msg.compat)
|
||||
{
|
||||
// compat clients need svc_snapshot to update reliableAcknowledge
|
||||
SV_WriteSnapshotToClient(cl, &msg);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
MSG_WriteByte(&msg, svc_EOF);
|
||||
MSG_WriteByte(&msg, svc_EOF);
|
||||
SV_Netchan_Transmit(cl, &msg);
|
||||
numDLs += retval;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,10 @@ static void SV_EmitPacketEntities( clientSnapshot_t *from, clientSnapshot_t *to,
|
|||
SV_WriteSnapshotToClient
|
||||
==================
|
||||
*/
|
||||
static void SV_WriteSnapshotToClient( client_t *client, msg_t *msg ) {
|
||||
#ifndef ELITEFORCE
|
||||
static
|
||||
#endif
|
||||
void SV_WriteSnapshotToClient( client_t *client, msg_t *msg ) {
|
||||
clientSnapshot_t *frame, *oldframe;
|
||||
int lastframe;
|
||||
int i;
|
||||
|
@ -671,12 +674,7 @@ void SV_SendClientMessages(void)
|
|||
if(!c->state)
|
||||
continue; // not connected
|
||||
|
||||
#ifdef ELITEFORCE
|
||||
// compat clients need svc_snapshot to update reliableAcknowledge
|
||||
if(*c->downloadName && !c->compat)
|
||||
#else
|
||||
if(*c->downloadName)
|
||||
#endif
|
||||
continue; // Client is downloading, don't send snapshots
|
||||
|
||||
if(c->netchan.unsentFragments || c->netchan_start_queue)
|
||||
|
|
Loading…
Reference in a new issue