Tally: Fix intermission music being played on rounds without intermissions

This commit is contained in:
AJ Martinez 2024-03-18 18:38:41 -07:00
parent 858eecaef3
commit 17cd1550a1
3 changed files with 20 additions and 7 deletions

View file

@ -1426,7 +1426,9 @@ void K_TickPlayerTally(player_t *player)
while (player->tally.state != TALLY_ST_DONE && player->tally.state != TALLY_ST_GAMEOVER_DONE);
player->tally.delay = std::min(player->tally.delay, TICRATE);
musiccountdown = 2; // gets decremented to 1 in G_Ticker to immediately trigger intermission music [blows raspberry]
if (Y_ShouldDoIntermission())
musiccountdown = 2; // gets decremented to 1 in G_Ticker to immediately trigger intermission music [blows raspberry]
}
else
{

View file

@ -1937,12 +1937,7 @@ void Y_Ticker(void)
}
}
//
// Y_DetermineIntermissionType
//
// Determines the intermission type from the current gametype.
//
void Y_DetermineIntermissionType(void)
boolean Y_ShouldDoIntermission(void)
{
// no intermission for GP events
if ((grandprixinfo.gp == true && grandprixinfo.eventmode != GPEVENT_NONE)
@ -1954,6 +1949,21 @@ void Y_DetermineIntermissionType(void)
|| (nextmapoverride == NEXTMAP_TUTORIALCHALLENGE+1 || tutorialchallenge != TUTORIALSKIP_NONE)
// or title screen attract demos
|| (demo.playback && demo.attract == DEMO_ATTRACT_TITLE))
{
return false;
}
return true;
}
//
// Y_DetermineIntermissionType
//
// Determines the intermission type from the current gametype.
//
void Y_DetermineIntermissionType(void)
{
// no intermission for GP events
if (!Y_ShouldDoIntermission())
{
intertype = int_none;
return;

View file

@ -59,6 +59,7 @@ void Y_DrawIntermissionButton(INT32 startslide, INT32 through);
void Y_StartIntermission(void);
void Y_EndIntermission(void);
boolean Y_ShouldDoIntermission(void);
void Y_DetermineIntermissionType(void);
void Y_PlayIntermissionMusic(void);