Removed directionalAudio member from App - wrong variable being used in sound.c for position.
This commit is contained in:
parent
34d021fa43
commit
7d32dcea80
|
@ -493,7 +493,6 @@ typedef struct {
|
|||
int musicVolume;
|
||||
int soundVolume;
|
||||
int vSync;
|
||||
int directionalAudio;
|
||||
int doTrophyAlerts;
|
||||
int hideMouse;
|
||||
Gameplay gameplay;
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue