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:
parent
d29bbb747d
commit
37392cfd7c
1 changed files with 17 additions and 14 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue