From 37392cfd7cb79510d54f7e01a1e18735340e8809 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 4 Oct 2005 20:38:19 +0000 Subject: [PATCH] Don't enable csqc if we can't use it properly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1417 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_parse.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index b2d460d57..17dc6dc9d 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -659,23 +659,26 @@ void Sound_NextDownload (void) { Con_TPrintf (TLC_CHECKINGSOUNDS); #ifdef CSQC_DAT - s = Info_ValueForKey(cl.serverinfo, "*csprogs"); - if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches. + if (cls.fteprotocolextensions & PEXT_CSQC) { - extern cvar_t allow_download_csprogs; - unsigned int chksum = strtoul(s, NULL, 0); - if (allow_download_csprogs.value) + s = Info_ValueForKey(cl.serverinfo, "*csprogs"); + if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches. { - char *str = va("csprogsvers/%x.dat", chksum); - if (!CL_CheckOrDownloadFile("csprogs.dat", str, true)) + extern cvar_t allow_download_csprogs; + unsigned int chksum = strtoul(s, NULL, 0); + if (allow_download_csprogs.value) { - cls.downloadnumber = 1; - return; + char *str = va("csprogsvers/%x.dat", chksum); + if (!CL_CheckOrDownloadFile("csprogs.dat", str, true)) + { + cls.downloadnumber = 1; + return; + } + } + else + { + Con_Printf("Not downloading csprogs.dat\n"); } - } - else - { - Con_Printf("Not downloading csprogs.dat\n"); } } cls.downloadnumber = 1; @@ -683,7 +686,7 @@ void Sound_NextDownload (void) } #ifdef CSQC_DAT - if (cls.downloadnumber == 1) + if (cls.downloadnumber == 1 && cls.fteprotocolextensions & PEXT_CSQC) { s = Info_ValueForKey(cl.serverinfo, "*csprogs"); if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches.