Skip to content

Commit

Permalink
Fix sfx initialization when music not enabled (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
conker-rsc authored Dec 24, 2023
1 parent 96ebe1a commit 1d9c8d9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Game/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -936,18 +936,18 @@ public static void update() {
float delta_time = (float) (nanoTime - last_time) / 1000000000.0f;
last_time = nanoTime;

// Set the mudclient volume
if (!customSfxVolumeSet) {
SoundEffects.adjustMudClientSfxVolume();
customSfxVolumeSet = true;
}

// Handle area data
if (Settings.CUSTOM_MUSIC.get(Settings.currentProfile)) {
if (state == STATE_GAME) {
AreaDefinition area = getCurrentAreaDefinition();
MusicPlayer.playTrack(area.music);
} else if (state == STATE_LOGIN) {
// Set the client volume
if (!customSfxVolumeSet) {
SoundEffects.adjustMudClientSfxVolume();
customSfxVolumeSet = true;
}

MusicPlayer.playTrack(loginTrack);
}
}
Expand Down

0 comments on commit 1d9c8d9

Please sign in to comment.