From 59fb8aad8c0653e020f09fc9eba885521c65c5e0 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 12 Mar 2024 05:34:55 -0700 Subject: [PATCH] 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 --- src/g_game.c | 5 ++++- src/p_user.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 45f7ae9ba..c6d1f9539 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -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(); diff --git a/src/p_user.c b/src/p_user.c index 63bfe58ba..b86271c69 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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;