1
0
Fork 0
forked from fte/fteqw

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
This commit is contained in:
Spoike 2005-10-04 20:38:19 +00:00
parent d29bbb747d
commit 37392cfd7c

View file

@ -659,23 +659,26 @@ void Sound_NextDownload (void)
{ {
Con_TPrintf (TLC_CHECKINGSOUNDS); Con_TPrintf (TLC_CHECKINGSOUNDS);
#ifdef CSQC_DAT #ifdef CSQC_DAT
s = Info_ValueForKey(cl.serverinfo, "*csprogs"); if (cls.fteprotocolextensions & PEXT_CSQC)
if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches.
{ {
extern cvar_t allow_download_csprogs; s = Info_ValueForKey(cl.serverinfo, "*csprogs");
unsigned int chksum = strtoul(s, NULL, 0); if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches.
if (allow_download_csprogs.value)
{ {
char *str = va("csprogsvers/%x.dat", chksum); extern cvar_t allow_download_csprogs;
if (!CL_CheckOrDownloadFile("csprogs.dat", str, true)) unsigned int chksum = strtoul(s, NULL, 0);
if (allow_download_csprogs.value)
{ {
cls.downloadnumber = 1; char *str = va("csprogsvers/%x.dat", chksum);
return; 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; cls.downloadnumber = 1;
@ -683,7 +686,7 @@ void Sound_NextDownload (void)
} }
#ifdef CSQC_DAT #ifdef CSQC_DAT
if (cls.downloadnumber == 1) if (cls.downloadnumber == 1 && cls.fteprotocolextensions & PEXT_CSQC)
{ {
s = Info_ValueForKey(cl.serverinfo, "*csprogs"); s = Info_ValueForKey(cl.serverinfo, "*csprogs");
if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches. if (*s || cls.demoplayback) //only allow csqc if the server says so, and the 'checksum' matches.