]> 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)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 7 Oct 2011 21:05:46 +0000 (23:05 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11388 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=6d2396afcbd2468777f372c680af9a3b679d44a0

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);