]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
reduced client memory usage by 29MB by making cl_max_entities dynamic (starts out...
[xonotic/darkplaces.git] / snd_main.c
index fe18aed74a5791afaec64c7d882190b0aa5261f0..f7dd6ee4df271ea35f18c93d8e5c4a24097bbb40 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 >= cl_max_entities)
+               CL_ExpandEntities(entnum);
+
        // Pick a channel to play on
        target_chan = SND_PickChannel(entnum, entchannel);
        if (!target_chan)