From 3bafaa371c65f82ac81126778a4b1b528b2f0ba9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 3 Dec 2000 01:57:29 +0000 Subject: [PATCH] don't bother downloading sounds if we are unable to play them. --- source/cl_parse.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/cl_parse.c b/source/cl_parse.c index a864a85..00b2544 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -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; }