]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
implemented individual file downloads on darkplaces servers
[xonotic/darkplaces.git] / snd_main.c
index b00852daca62da1cd36e283926665bae4aaa513f..2c32953ab92a991b5006a3672727108605b17aa1 100644 (file)
@@ -919,6 +919,9 @@ void S_ServerSounds (char serversound [][MAX_QPATH], unsigned int numsounds)
                sfx = S_FindName (serversound[i]);
                if (sfx != NULL)
                {
+                       // clear the FILEMISSING flag so that S_LoadSound will try again on a
+                       // previously missing file
+                       sfx->flags &= ~ SFXFLAG_FILEMISSING;
                        S_LockSfx (sfx);
                        sfx->flags |= SFXFLAG_SERVERSOUND;
                }
@@ -950,13 +953,13 @@ sfx_t *S_PrecacheSound (const char *name, qboolean complain, qboolean lock)
 
        sfx = S_FindName (name);
 
+       if (sfx == NULL)
+               return NULL;
+
        // clear the FILEMISSING flag so that S_LoadSound will try again on a
        // previously missing file
        sfx->flags &= ~ SFXFLAG_FILEMISSING;
 
-       if (sfx == NULL)
-               return NULL;
-
        if (lock)
                S_LockSfx (sfx);