fixed an error case in S_StartSound
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2005 22:23:17 +0000 (22:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 5 Apr 2005 22:23:17 +0000 (22:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5161 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index f7dd6ee..9e26532 100644 (file)
@@ -574,7 +574,7 @@ int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float f
                return -1;
        }
 
-       if (entnum >= cl_max_entities)
+       if (entnum && entnum >= cl_max_entities)
                CL_ExpandEntities(entnum);
 
        // Pick a channel to play on