Successful attempt at restarting the music

This commit is contained in:
Steel Titanium 2017-11-08 14:48:05 -05:00
parent c1405137ec
commit 55c86f3e15

View file

@ -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.