hack: reset musiccredits when changing gamestate

otherwise they may persist if theyve been currently displayed
This commit is contained in:
Alug committed 2025-05-31 16:21:20 +02:00
1 parent 6d4bb49db6
commit 90cf826983
3 files changed
+11

No files matched your search

+5
View File
@@ -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
+5
View File
@@ -1440,6 +1440,11 @@ musicdef_t *S_FindMusicCredit(const char *musname)
return NULL;
}
void S_ResetMusicCredit(void)
{
memset(&cursongcredit, 0, sizeof(cursongcredit));
}
//
// S_ShowSpecifiedMusicCredit
//
+1
View File
@@ -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);