When using the native BD game engine, but not using the native BD
sound engine, loop sounds were not played anymore due to a bug with
off-playfield sound positions.
This bug was introduced by commit
386e26cf.
// plays sound in a cave
void gd_sound_play(GdCave *cave, GdSound sound, GdElement element, int x, int y)
{
- // fix wrap-around cave positions
- x = (x + cave->w) % cave->w;
- y = (y + cave->h) % cave->h;
+ if (x != -1 || y != -1)
+ {
+ // fix wrap-around cave positions
+ x = (x + cave->w) % cave->w;
+ y = (y + cave->h) % cave->h;
+ }
if (sound == GD_S_NONE)
return;