Play TIMENT for mode attack intermission

This commit is contained in:
Eidolon 2024-02-21 17:36:03 -06:00
parent ee064b5395
commit 6dc6bb63a7
5 changed files with 23 additions and 3 deletions

View file

@ -1984,7 +1984,7 @@ void G_Ticker(boolean run)
musiccountdown--; musiccountdown--;
if (musiccountdown == 1) if (musiccountdown == 1)
{ {
Music_Play("intermission"); Music_PlayIntermission();
} }
else if (musiccountdown == MUSIC_COUNTDOWN_MAX - K_TallyDelay()) else if (musiccountdown == MUSIC_COUNTDOWN_MAX - K_TallyDelay())
{ {

View file

@ -216,6 +216,20 @@ void Music_Play(const char* id)
} }
} }
void Music_PlayIntermission(void)
{
// why aren't the ATTACK_ enums declared alongside modeattacking?
if (modeattacking != 0)
{
Music_Remap("intermission", "timent");
}
else
{
Music_Remap("intermission", "racent");
}
Music_Play("intermission");
}
void Music_DelayEnd(const char* id, tic_t duration) void Music_DelayEnd(const char* id, tic_t duration)
{ {
Tune* tune = g_tunes.find(id); Tune* tune = g_tunes.find(id);

View file

@ -59,6 +59,10 @@ const char *Music_CurrentId(void);
// back to the start.) // back to the start.)
void Music_Play(const char *id); void Music_Play(const char *id);
// Same as Music_Play, but a convenience for remapping intermission
// based on game state.
void Music_PlayIntermission(void);
// Postpone the end of this tune until N tics from now. The // Postpone the end of this tune until N tics from now. The
// tune should already be playing before calling this. // tune should already be playing before calling this.
void Music_DelayEnd(const char *id, tic_t duration); void Music_DelayEnd(const char *id, tic_t duration);

View file

@ -1217,7 +1217,7 @@ void S_AttemptToRestoreMusic(void)
} }
// FALLTHRU // FALLTHRU
case GS_INTERMISSION: case GS_INTERMISSION:
Music_Play("intermission"); Music_PlayIntermission();
break; break;
case GS_CEREMONY: case GS_CEREMONY:
Music_Play("level"); Music_Play("level");

View file

@ -2132,7 +2132,9 @@ void Y_StartIntermission(void)
G_SetGamestate(GS_INTERMISSION); G_SetGamestate(GS_INTERMISSION);
if (musiccountdown == 0) if (musiccountdown == 0)
Music_Play("intermission"); {
Music_PlayIntermission();
}
S_ShowMusicCredit(); // Always call S_ShowMusicCredit(); // Always call