]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_main.c
fixed multiple crashes and infinite loops in sound mixer
[xonotic/darkplaces.git] / snd_main.c
index 34727e61cae76f87042047d57f58fe3267f3c047..70ea80a519673606cfa90a7204d2cbb5a2d35b17 100644 (file)
@@ -1678,7 +1678,7 @@ int S_StartSound_StartPosition_Flags (int entnum, int entchannel, sfx_t *sfx, ve
                        if (check->sfx == sfx && check->position == 0)
                        {
                                // use negative pos offset to delay this sound effect
-                               startpos = (int)lhrandom(0, -0.1 * snd_renderbuffer->format.speed);
+                               startpos = lhrandom(0, -0.1 * sfx->format.speed);
                                break;
                        }
                }