From 46c8b47236f9d350cac7059c7657a9715c5b54a0 Mon Sep 17 00:00:00 2001 From: James R Date: Fri, 17 Nov 2023 01:04:51 -0800 Subject: [PATCH] P_DoPlayerExit, P_DoTimeOver: replace Music_StopAll with silent track - Silent track has priority over level music and invinc/grow themes --- src/music.cpp | 7 +++++++ src/p_user.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/music.cpp b/src/music.cpp index a2aef3070..b95d74b4a 100644 --- a/src/music.cpp +++ b/src/music.cpp @@ -57,6 +57,13 @@ void Music_Init(void) tune.priority = 21; } + { + Tune& tune = g_tunes.insert("finish_silence"); + + tune.song = ""; + tune.priority = 30; + } + { Tune& tune = g_tunes.insert("finish"); diff --git a/src/p_user.c b/src/p_user.c index fbb03d497..7be2091dc 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1284,7 +1284,7 @@ void P_DoPlayerExit(player_t *player, pflags_t flags) if (P_IsLocalPlayer(player) && !specialout && musiccountdown == 0) { - Music_StopAll(); + Music_Play("finish_silence"); musiccountdown = MUSIC_COUNTDOWN_MAX; } @@ -3787,7 +3787,7 @@ void P_DoTimeOver(player_t *player) if (P_IsLocalPlayer(player) && musiccountdown == 0) { - Music_StopAll(); + Music_Play("finish_silence"); musiccountdown = MUSIC_COUNTDOWN_MAX; }