]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
fixed bullets-going-through-walls bug in q3bsp collision code, this was a really...
[xonotic/darkplaces.git] / snd_main.c
index 4030d3878dcd94a36aee7c4ce853f48ad3f7b67d..186fc0e56836f9d46d1682258fe02ea2d5af7770 100644 (file)
@@ -416,6 +416,9 @@ sfx_t *S_PrecacheSound (const char *name, qboolean complain, qboolean lock)
        if (!snd_initialized.integer)
                return NULL;
 
+       if (name == NULL || name[0] == 0)
+               return NULL;
+
        sfx = S_FindName (name);
        if (sfx == NULL)
                return NULL;
@@ -429,6 +432,16 @@ sfx_t *S_PrecacheSound (const char *name, qboolean complain, qboolean lock)
        return sfx;
 }
 
+/*
+==================
+S_IsSoundPrecached
+==================
+*/
+qboolean S_IsSoundPrecached (const sfx_t *sfx)
+{
+       return (sfx != NULL && sfx->fetcher != NULL);
+}
+
 /*
 ==================
 S_LockSfx