Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sfx initialization when music not enabled #187

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Game/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Loading