diff --git a/Source/effects.cpp b/Source/effects.cpp index 36f7fee0a..904675ae3 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -1277,9 +1277,12 @@ static int RndSFX(int psfx) return psfx + random_(165, nRand); } -void PlaySFX(int psfx) +void PlaySFX(int psfx, bool randomizeByCategory) { - psfx = RndSFX(psfx); + if (randomizeByCategory) { + psfx = RndSFX(psfx); + } + PlaySFX_priv(&sgSFX[psfx], FALSE, 0, 0); } diff --git a/Source/effects.h b/Source/effects.h index 0d9e05111..fe630d3b4 100644 --- a/Source/effects.h +++ b/Source/effects.h @@ -21,7 +21,7 @@ void InitMonsterSND(int monst); void FreeMonsterSnd(); BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan); void PlayEffect(int i, int mode); -void PlaySFX(int psfx); +void PlaySFX(int psfx, bool randomizeByCategory = true); void PlaySfxLoc(int psfx, int x, int y); void sound_stop(); void sound_update();