diff --git a/src/g_game.c b/src/g_game.c index 26601b578..8eb394756 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -8235,6 +8235,11 @@ boolean G_DemoTitleResponder(event_t *ev) void G_SetGamestate(gamestate_t newstate) { gamestate = newstate; + + //HACK: reset musiccredits whenever we change gamestate + // since we allow them to run everywhere now + S_ResetMusicCredit(); + #ifdef HAVE_DISCORDRPC DRPC_UpdatePresence(); #endif diff --git a/src/s_sound.c b/src/s_sound.c index 3a3aa84d8..4b77836a4 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1440,6 +1440,11 @@ musicdef_t *S_FindMusicCredit(const char *musname) return NULL; } +void S_ResetMusicCredit(void) +{ + memset(&cursongcredit, 0, sizeof(cursongcredit)); +} + // // S_ShowSpecifiedMusicCredit // diff --git a/src/s_sound.h b/src/s_sound.h index f159822af..542dd733f 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -208,6 +208,7 @@ void S_InitMTDefs(void); musicdef_t *S_FindMusicCredit(const char *musname); void S_ShowSpecifiedMusicCredit(const char *musname); void S_ShowMusicCredit(void); +void S_ResetMusicCredit(void); boolean S_PrepareSoundTest(void);