Closed fabiangreffrath closed 5 years ago
The problem is that G_InitNew()
, which gets called by G_DoLoadGame()
, unconditionally sets paused = false
. Since we still have setpause = true
, we trigger a BTS_PAUSE
button press in the changed code block, which will get interpreted as entering pause again (instead of actually un-pausing) in the next tic.
I am sure this patch fixes the original issue, i.e. the game doesn't un-pause after loading during demo recording. I am not sure, though, if this also fixes the silent un-pausing during the savegame loading confirmation menu that @Zodomaniac reported in #396 .
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 32af667d..d449afd2 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -751,7 +751,7 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic)
{
sendpause = false;
// [crispy] ignore un-pausing in menus during demo recording
- if (!(menuactive && demorecording && paused))
+ if (!(menuactive && demorecording && paused) && gameaction != ga_loadgame)
{
cmd->buttons = BT_SPECIAL | BTS_PAUSE;
}
Reported here:
https://www.doomworld.com/forum/topic/67168-crispy-doom-551-update-march-7-2019/?page=40&tab=comments#comment-1972083