From 4faf4e7adfc1ae94381a6f5bd7ba65fccef77676 Mon Sep 17 00:00:00 2001 From: conker-rsc <16803725+conker-rsc@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:46:40 -0600 Subject: [PATCH] Fix sfx initialization when music not enabled --- src/Game/Client.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Game/Client.java b/src/Game/Client.java index 6469c9b0..d2c3da04 100644 --- a/src/Game/Client.java +++ b/src/Game/Client.java @@ -941,18 +941,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); } }