]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
sound: when randomizing sound start times, check pitch (base speed) too
[xonotic/darkplaces.git] / 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);