]> 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 fe18aed74a5791afaec64c7d882190b0aa5261f0..9e2653283a8dcd3ad7de94ae84ca83c99688de94 100644 (file)
@@ -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)