Fix linedef 413 showing wrong music credit sometimes
This commit is contained in:
1 parent
dfcc959adb
commit
efb03e70ad
3 files changed
+17
-6
No files matched your search
+2
-2
@@ -2495,8 +2495,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
||||
}
|
||||
|
||||
// Show credit
|
||||
if (!(line->flags & ML_EFFECT3))
|
||||
S_ShowMusicCredit();
|
||||
if (!(line->flags & ML_EFFECT3) && !musicsame && sides[line->sidenum[0]].text[0])
|
||||
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.
|
||||
|
||||
+14
-4
@@ -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
|
||||
/// ------------------------
|
||||
|
||||
@@ -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);
|
||||
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user