From 50c78e6d52a4cf1d17a5808a13ce2649abebeb1b Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 22 Aug 2015 20:12:18 -0500 Subject: [PATCH] Fix sending downloads to 1.2 clients / legacy protocol --- code/server/sv_client.c | 17 +++++++++++++++-- code/server/sv_snapshot.c | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 3679c2cb..5d3bd3c9 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -1241,13 +1241,26 @@ int SV_SendDownloadMessages(void) if(cl->state && *cl->downloadName) { - MSG_Init(&msg, msgBuffer, sizeof(msgBuffer)); - MSG_WriteLong(&msg, cl->lastClientCommand); +#ifdef ELITEFORCE + if(cl->compat) + { + MSG_InitOOB(&msg, msgBuffer, sizeof(msgBuffer)); + msg.compat = qtrue; + } + else +#endif + { + MSG_Init(&msg, msgBuffer, sizeof(msgBuffer)); + MSG_WriteLong(&msg, cl->lastClientCommand); + } retval = SV_WriteDownloadToClient(cl, &msg); if(retval) { +#ifdef ELITEFORCE + if(!msg.compat) +#endif MSG_WriteByte(&msg, svc_EOF); SV_Netchan_Transmit(cl, &msg); numDLs += retval; diff --git a/code/server/sv_snapshot.c b/code/server/sv_snapshot.c index f34adb55..b249d520 100644 --- a/code/server/sv_snapshot.c +++ b/code/server/sv_snapshot.c @@ -671,7 +671,12 @@ 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)