From 55c86f3e1558c6bf34de2de4a9b36cd9f9c12df4 Mon Sep 17 00:00:00 2001 From: Steel Titanium Date: Wed, 8 Nov 2017 14:48:05 -0500 Subject: [PATCH] Successful attempt at restarting the music --- src/d_netcmd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 67a680c31..e433e3c53 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3914,9 +3914,10 @@ static void Command_Tunes_f(void) static void Command_RestartAudio_f(void) { - if (dedicated) // No point in doing anything game is a dedicated server. + if (dedicated) { // No point in doing anything if game is a dedicated server. return; - +} + S_StopMusic(); I_ShutdownMusic(); I_ShutdownSound(); I_StartupSound(); @@ -3927,8 +3928,9 @@ static void Command_RestartAudio_f(void) I_SetSfxVolume(cv_soundvolume.value); I_SetDigMusicVolume(cv_digmusicvolume.value); I_SetMIDIMusicVolume(cv_midimusicvolume.value); - if (Playing() && (!dedicated)) - P_RestoreMusic(displayplayer); + if (Playing() && (!dedicated)) { // Gotta make sure the player is in a level + P_RestoreMusic(&players[displayplayer]); + } } /** Quits a game and returns to the title screen.