mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
s_sound.c: Only call P_RestoreMusic in GS_LEVEL
This function isn't supposed to be called outside of it
This commit is contained in:
parent
42cc95f6ed
commit
afff038e34
1 changed files with 11 additions and 3 deletions
|
|
@ -2623,10 +2623,18 @@ static void Command_RestartAudio_f(void)
|
||||||
|
|
||||||
S_StartSound(NULL, sfx_strpst);
|
S_StartSound(NULL, sfx_strpst);
|
||||||
|
|
||||||
if (Playing()) // Gotta make sure the player is in a level
|
if (gamestate == GS_LEVEL) // Gotta make sure the player is in a level
|
||||||
|
{
|
||||||
P_RestoreMusic(&players[consoleplayer]);
|
P_RestoreMusic(&players[consoleplayer]);
|
||||||
|
}
|
||||||
|
else if (gamestate == GS_TITLESCREEN)
|
||||||
|
{
|
||||||
|
S_ChangeMusicInternal("_title", looptitle);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
S_ChangeMusicInternal("titles", looptitle);
|
{
|
||||||
|
M_PlayMenuJam();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Command_PlaySound(void)
|
static void Command_PlaySound(void)
|
||||||
|
|
@ -2726,7 +2734,7 @@ void GameDigiMusic_OnChange(void)
|
||||||
I_StartupSound(); // will return early if initialised
|
I_StartupSound(); // will return early if initialised
|
||||||
I_InitMusic();
|
I_InitMusic();
|
||||||
|
|
||||||
if (Playing())
|
if (gamestate == GS_LEVEL)
|
||||||
{
|
{
|
||||||
P_RestoreMusic(&players[consoleplayer]);
|
P_RestoreMusic(&players[consoleplayer]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue