forked from fte/fteqw
1
0
Fork 0

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
1 changed files with 17 additions and 14 deletions

View File

@ -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.