Commit 40ed13aa authored by Dino Bollinger's avatar Dino Bollinger

Duke3D: Sounds resume playback after demo pause is turned off.

Also fixed an edge case.
parent c28adba3
......@@ -4703,8 +4703,7 @@ void G_HandleLocalKeys(void)
g_demo_paused = !g_demo_paused;
g_demo_rewind = 0;
if (g_demo_paused)
FX_StopAllSounds();
S_PauseSounds(g_demo_paused || ud.pause_on);
}
if (KB_KeyPressed(sc_Tab))
......
......@@ -4875,8 +4875,7 @@ void Menu_Close(uint8_t playerID)
walock[TILE_SAVESHOT] = CACHE1D_FREE;
G_UpdateScreenArea();
if (!ud.pause_on)
S_PauseSounds(false);
S_PauseSounds(ud.pause_on || (ud.recstat == 2 && g_demo_paused));
}
}
......
......@@ -1182,8 +1182,7 @@ void G_DisplayRest(int32_t smoothratio)
I_EscapeTriggerClear();
S_PlaySound(EXITMENUSOUND);
Menu_Change(MENU_CLOSE);
if (!ud.pause_on)
S_PauseSounds(false);
S_PauseSounds(ud.pause_on || (ud.recstat == 2 && g_demo_paused));
}
else if ((g_player[myconnectindex].ps->gm&MODE_MENU) != MODE_MENU &&
g_player[myconnectindex].ps->newowner == -1 &&
......
......@@ -2654,7 +2654,8 @@ void P_HandleSharedKeys(int playerNum)
else ud.pause_on = 1+SHIFTS_IS_PRESSED;
if (ud.pause_on)
{
S_PauseMusic(true);
if (ud.recstat != 2) // edge case: pause during demo recording
S_PauseMusic(true);
S_PauseSounds(true);
}
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment