Replays: end level music at tally of currently viewed player

- This is symmetrical with splitscreen behavior
- One edge case: if you switch away from the player after
  the level music stops but before the intermission music
  starts, then the silence will continue until you view
  another tally that reaches the intermission music
  - I think the benefit of doing the proper tally music at
    all outweighs this edge case
This commit is contained in:
James R 2024-03-12 05:34:55 -07:00
parent 5caa30d8d8
commit 59fb8aad8c
2 changed files with 6 additions and 3 deletions

View file

@ -2003,7 +2003,7 @@ void G_Ticker(boolean run)
memset(player_name_changes, 0, sizeof player_name_changes);
}
if (Playing() == true)
if (Playing() == true || demo.playback)
{
if (musiccountdown > 1)
{
@ -2017,7 +2017,10 @@ void G_Ticker(boolean run)
P_EndingMusic();
}
}
}
if (Playing() == true)
{
P_InvincGrowMusic();
K_TickMidVote();

View file

@ -1273,7 +1273,7 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
K_UpdatePowerLevelsFinalize(player, false);
if (P_IsPartyPlayer(player) && !specialout && musiccountdown == 0)
if (G_IsPartyLocal(player - players) && !specialout && musiccountdown == 0)
{
Music_Play("finish_silence");
musiccountdown = MUSIC_COUNTDOWN_MAX;
@ -3833,7 +3833,7 @@ void P_DoTimeOver(player_t *player)
P_DamageMobj(player->mo, NULL, NULL, 1, DMG_TIMEOVER);
}
if (P_IsPartyPlayer(player) && musiccountdown == 0)
if (G_IsPartyLocal(player - players) && musiccountdown == 0)
{
Music_Play("finish_silence");
musiccountdown = MUSIC_COUNTDOWN_MAX;