diff --git a/src/structs.h b/src/structs.h index 131e289..0181534 100644 --- a/src/structs.h +++ b/src/structs.h @@ -493,7 +493,6 @@ typedef struct { int musicVolume; int soundVolume; int vSync; - int directionalAudio; int doTrophyAlerts; int hideMouse; Gameplay gameplay; diff --git a/src/system/init.c b/src/system/init.c index 1a9fd40..bff80ec 100644 --- a/src/system/init.c +++ b/src/system/init.c @@ -242,7 +242,6 @@ static void loadConfigFile(char *filename) app.musicVolume = cJSON_GetObjectItem(root, "musicVolume")->valueint; app.soundVolume = cJSON_GetObjectItem(root, "soundVolume")->valueint; app.vSync = getJSONValue(root, "vSync", 1); - app.directionalAudio = getJSONValue(root, "directionalAudio", 0); controlsJSON = cJSON_GetObjectItem(root, "controls"); if (controlsJSON) @@ -298,7 +297,6 @@ void saveConfig(void) cJSON_AddNumberToObject(root, "musicVolume", app.musicVolume); cJSON_AddNumberToObject(root, "soundVolume", app.soundVolume); cJSON_AddNumberToObject(root, "vSync", app.vSync); - cJSON_AddNumberToObject(root, "directionalAudio", app.directionalAudio); keysJSON = cJSON_CreateObject(); for (i = 0 ; i < CONTROL_MAX ; i++) diff --git a/src/system/sound.c b/src/system/sound.c index 08b5235..6a377b7 100644 --- a/src/system/sound.c +++ b/src/system/sound.c @@ -98,10 +98,10 @@ void playBattleSound(int id, int x, int y) vol /= MAX_BATTLE_SOUND_DISTANCE; vol *= distance; - if (app.directionalAudio && distance >= MIN_BATTLE_SOUND_DISTANCE) + if (distance >= MIN_BATTLE_SOUND_DISTANCE) { bearing = 360 - getAngle(x, y, lastPlayerX, lastPlayerY); - Mix_SetPosition(channel, (Sint16)bearing, (Uint8)distance); + Mix_SetPosition(channel, (Sint16)bearing, (Uint8)vol); } else {