]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
fix a bug in the early out case of R_Q1BSP_DrawLight
[xonotic/darkplaces.git] / snd_main.c
index ede502866e66f32e7f3ae39002ad197e18f11ae5..9e2653283a8dcd3ad7de94ae84ca83c99688de94 100644 (file)
@@ -365,7 +365,7 @@ void S_ServerSounds (char serversound [][MAX_QPATH], unsigned int numsounds)
        for (sfx = known_sfx;sfx;sfx = sfxnext)
        {
                sfxnext = sfx->next;
-               S_FreeSfx (sfx);
+               S_FreeSfx (sfx, false);
        }
 }
 
@@ -574,6 +574,9 @@ int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
                return -1;
        }
 
+       if (entnum && entnum >= cl_max_entities)
+               CL_ExpandEntities(entnum);
+
        // Pick a channel to play on
        target_chan = SND_PickChannel(entnum, entchannel);
        if (!target_chan)