From c021e298357c2fd96d2992394c4bd53a49f8d6a0 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Wed, 13 Mar 2019 21:18:23 -0400
Subject: [PATCH] Restore MUSIC_RELOADRESET if block in g_game

---
 src/g_game.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/g_game.c b/src/g_game.c
index 0992d55a7a..c0cb469a1d 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -2263,6 +2263,22 @@ void G_PlayerReborn(INT32 player)
 	if ((netgame || multiplayer) && !p->spectator)
 		p->powers[pw_flashing] = flashingtics-1; // Babysitting deterrent
 
+	if (p-players == consoleplayer)
+	{
+		if (mapmusflags & MUSIC_RELOADRESET)
+		{
+			strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7);
+			mapmusname[6] = 0;
+			mapmusflags = (mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK);
+			mapmusposition = mapheaderinfo[gamemap-1]->muspos;
+		}
+
+		// This is in S_Start, but this was not here previously.
+		// if (cv_resetmusic.value)
+		// 	S_StopMusic();
+		S_ChangeMusicEx(mapmusname, mapmusflags, true, mapmusposition, 0, 0);
+	}
+
 	if (gametype == GT_COOP)
 		P_FindEmerald(); // scan for emeralds to hunt for
 
-- 
GitLab