diff --git a/src/system/sound.c b/src/system/sound.c index 313983e..08b5235 100644 --- a/src/system/sound.c +++ b/src/system/sound.c @@ -98,7 +98,7 @@ void playBattleSound(int id, int x, int y) vol /= MAX_BATTLE_SOUND_DISTANCE; vol *= distance; - if (distance >= MIN_BATTLE_SOUND_DISTANCE) + if (app.directionalAudio && distance >= MIN_BATTLE_SOUND_DISTANCE) { bearing = 360 - getAngle(x, y, lastPlayerX, lastPlayerY); Mix_SetPosition(channel, (Sint16)bearing, (Uint8)distance); diff --git a/src/system/sound.h b/src/system/sound.h index 9e6f6c6..e49701c 100644 --- a/src/system/sound.h +++ b/src/system/sound.h @@ -29,4 +29,5 @@ extern int getDistance(int x1, int y1, int x2, int y2); extern float getAngle(int x1, int y1, int x2, int y2); extern char *getFileLocation(char *filename); +extern App app; extern Entity *player;