]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_parse.c
fix sound spatialization and S_StartSound to deal with the 32768+entnum
[xonotic/darkplaces.git] / cl_parse.c
index 4a1dca33433d00b92fa9c9a331eea9907f23a6ed..e7790bbc62ed6c7d76eb330fd54d3eb7578783f5 100644 (file)
@@ -262,6 +262,9 @@ void CL_ParseStartSoundPacket(int largesoundindex)
                return;
        }
 
+       if (ent >= cl.max_entities)
+               CL_ExpandEntities(ent);
+
        S_StartSound (ent, channel, cl.sound_precache[sound_num], pos, volume/255.0f, attenuation);
 }