From 4f388428bc6b68c77d4696a018cbc2b758e81f3e Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 25 Aug 2018 08:43:54 -0400 Subject: [PATCH] Add MUSIC_FORCERESET flag --- src/doomstat.h | 1 + src/s_sound.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doomstat.h b/src/doomstat.h index f960dcd80..092fce418 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -35,6 +35,7 @@ extern char mapmusname[7]; extern UINT16 mapmusflags; #define MUSIC_TRACKMASK 0x0FFF // ----************ #define MUSIC_RELOADRESET 0x8000 // *--------------- +#define MUSIC_FORCERESET 0x4000 // -*-------------- // Use other bits if necessary. extern INT16 maptol; diff --git a/src/s_sound.c b/src/s_sound.c index 2126dfc07..6ab68b2ec 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1584,7 +1584,7 @@ void S_ChangeMusicAdvanced(const char *mmusic, UINT16 mflags, boolean looping, U I_FadeSong(0, prefadems, S_ChangeMusicToQueue); return; } - else if (strncmp(music_name, newmusic, 6)) + else if (strncmp(music_name, newmusic, 6) || (mflags & MUSIC_FORCERESET)) { CONS_Debug(DBG_DETAILED, "Now playing song %s\n", newmusic);