diff --git a/src/p_spec.c b/src/p_spec.c index 762214d45..7779ac6cd 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2463,9 +2463,6 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) else S_FadeMusicFromVolume(fadetarget, fadesource, postfadems); - if (!(line->flags & ML_EFFECT3)) - S_ShowMusicCredit(); - if (position) S_SetMusicPosition(position); } @@ -2497,6 +2494,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) } } + // Show credit + if (!(line->flags & ML_EFFECT3) && !musicsame && sides[line->sidenum[0]].text[0] && leveltime >= starttime) + S_ShowSpecifiedMusicCredit(sides[line->sidenum[0]].text); + // Except, you can use the ML_BLOCKMONSTERS flag to change this behavior. // if (mapmusflags & MUSIC_RELOADRESET) then it will reset the music in G_PlayerReborn. } diff --git a/src/s_sound.c b/src/s_sound.c index 75785dac2..c0d78bad2 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1485,11 +1485,11 @@ void S_InitMusicDefs(void) } // -// S_ShowMusicCredit +// S_ShowSpecifiedMusicCredit // -// Display current song's credit on screen +// Display song's credit on screen // -void S_ShowMusicCredit(void) +void S_ShowSpecifiedMusicCredit(const char *musname) { musicdef_t *def = musicdefstart; @@ -1501,7 +1501,7 @@ void S_ShowMusicCredit(void) while (def) { - if (!stricmp(def->name, music_name)) + if (!stricmp(def->name, musname)) { cursongcredit.def = def; cursongcredit.anim = 5*TICRATE; @@ -1514,6 +1514,16 @@ void S_ShowMusicCredit(void) } } +// +// S_ShowMusicCredit +// +// Display current song's credit on screen +// +void S_ShowMusicCredit(void) +{ + S_ShowSpecifiedMusicCredit(music_name); +} + /// ------------------------ /// Music Status /// ------------------------ diff --git a/src/s_sound.h b/src/s_sound.h index d67bb7bcf..577ccfb54 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -154,6 +154,7 @@ extern musicdef_t *musicdefstart; void S_LoadMusicDefs(UINT16 wadnum); void S_InitMusicDefs(void); +void S_ShowSpecifiedMusicCredit(const char *musname); void S_ShowMusicCredit(void); //