]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
sound: when randomizing sound start times, check pitch (base speed) too
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 4 Oct 2011 07:35:30 +0000 (07:35 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 4 Oct 2011 07:35:30 +0000 (07:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11388 d7cf8633-e32d-0410-b094-e92efae38249

snd_main.c

index 70ea80a519673606cfa90a7204d2cbb5a2d35b17..d0a1011c4cf1f64ffd7b25c94e60f99efb2d42bb 100644 (file)
@@ -1675,7 +1675,7 @@ int S_StartSound_StartPosition_Flags (int entnum, int entchannel, sfx_t *sfx, ve
                {
                        if (check == target_chan)
                                continue;
-                       if (check->sfx == sfx && check->position == 0)
+                       if (check->sfx == sfx && check->position == 0 && check->basespeed == fspeed)
                        {
                                // use negative pos offset to delay this sound effect
                                startpos = lhrandom(0, -0.1 * sfx->format.speed);