mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Successful attempt at restarting the music
This commit is contained in:
parent
c1405137ec
commit
55c86f3e15
1 changed files with 6 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue