mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-03-13 03:33:28 +00:00
don't bother downloading sounds if we are unable to play them.
This commit is contained in:
parent
8ed2ff9241
commit
3bafaa371c
1 changed files with 7 additions and 4 deletions
|
@ -198,15 +198,18 @@ qboolean CL_CheckOrDownloadFile (char *filename)
|
||||||
{
|
{
|
||||||
QFile *f;
|
QFile *f;
|
||||||
|
|
||||||
if (strstr (filename, ".."))
|
if (strstr (filename, "..")) {
|
||||||
{
|
|
||||||
Con_Printf ("Refusing to download a path with ..\n");
|
Con_Printf ("Refusing to download a path with ..\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!snd_initialized && strnequal ("sound/", filename, 6)) {
|
||||||
|
// don't bother downloading sownds if we can't play them
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
COM_FOpenFile (filename, &f);
|
COM_FOpenFile (filename, &f);
|
||||||
if (f)
|
if (f) { // it exists, no need to download
|
||||||
{ // it exists, no need to download
|
|
||||||
Qclose (f);
|
Qclose (f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue