don't bother downloading sounds if we are unable to play them.

This commit is contained in:
Bill Currie 2000-12-03 01:57:29 +00:00
parent 8ed2ff9241
commit 3bafaa371c

View file

@ -198,15 +198,18 @@ qboolean CL_CheckOrDownloadFile (char *filename)
{
QFile *f;
if (strstr (filename, ".."))
{
if (strstr (filename, "..")) {
Con_Printf ("Refusing to download a path with ..\n");
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);
if (f)
{ // it exists, no need to download
if (f) { // it exists, no need to download
Qclose (f);
return true;
}