From d875a0c67476bcbfbe2f0c8615968bcf561b131a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 5 Apr 2010 09:17:34 +0000 Subject: [PATCH] - fixed: Loading a savegame with music switched off forced a restart of the map's default music because starting an empty music was considered an error. SVN r2272 (trunk) --- src/s_playlist.cpp | 7 ++++++- src/s_sound.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/s_playlist.cpp b/src/s_playlist.cpp index e92a5ceea..e7170eaa8 100644 --- a/src/s_playlist.cpp +++ b/src/s_playlist.cpp @@ -122,7 +122,12 @@ bool FPlayList::ChangeList (const char *path) // Path is relative; append it to the playlist directory. song = playlistdir + song; } - Songs.Push(song); + + // Just to make sure + if (song.IsNotEmpty()) + { + Songs.Push(song); + } } fclose (file); diff --git a/src/s_sound.cpp b/src/s_sound.cpp index f31f1c2da..db0f0f21d 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -2327,7 +2327,7 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force) // Don't choke if the map doesn't have a song attached S_StopMusic (true); mus_playing.name = ""; - return false; + return true; } FString DEH_Music;