From 7efcc912659c9a14dbdb2e782d03fb85602979ea Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 8 Feb 2011 20:21:37 +0000 Subject: [PATCH] fix compiling error when in standalone mode --- code/server/sv_client.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/code/server/sv_client.c b/code/server/sv_client.c index e14454af..2490ab55 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -847,7 +847,7 @@ void SV_WriteDownloadToClient( client_t *cl , msg_t *msg ) int curindex; int rate; int blockspersnap; - int idPack = 0, missionPack = 0, unreferenced = 1; + int unreferenced = 1; char errorMessage[1024]; char pakbuf[MAX_QPATH], *pakptr; int numRefPaks; @@ -855,7 +855,13 @@ void SV_WriteDownloadToClient( client_t *cl , msg_t *msg ) if (!*cl->downloadName) return; // Nothing being downloaded - if (!cl->download) { + if(!cl->download) + { + qboolean idPack = qfalse; + #ifndef STANDALONE + qboolean missionPack = qfalse; + #endif + // Chop off filename extension. Com_sprintf(pakbuf, sizeof(pakbuf), "%s", cl->downloadName); pakptr = Q_strrchr(pakbuf, '.'); @@ -882,8 +888,11 @@ void SV_WriteDownloadToClient( client_t *cl , msg_t *msg ) // now that we know the file is referenced, // check whether it's legal to download it. +#ifndef STANDALONE missionPack = FS_idPak(pakbuf, BASETA, NUM_TA_PAKS); - idPack = missionPack || FS_idPak(pakbuf, BASEGAME, NUM_ID_PAKS); + idPack = missionPack; +#endif + idPack = idPack || FS_idPak(pakbuf, BASEGAME, NUM_ID_PAKS); break; }