Closed SoDOOManiac closed 6 years ago
Checked Choco behavior: it doesn't get stuck in a pause after saving game in a demo, but the demo desyncs on playback.
That's the very reason why Crispy switches to pause as soon as the demo is entered.
However, it should switch back when the demo is left, need to investigate that...
However, it should switch back when the demo is left
What exactly do you mean, what should 'switch back' upon leaving the demo (entering the menu)?
During demo recording, entering the menus should switch the game to pause and leaving the menus again should unpause the game.
BTW, was this save or quicksave?
No matter if the save was quick or not, one gets stuck in a pause after save. So you say it's a price paid to keep demos in sync?
Okay, I think I understand why this doesn't work: It is currently impossible to send both a "pause/unpause" and a "save game" event within the same tic. See how the "save game" event overrides the cmd->buttons
field just after is has been set to BTS_PAUSE
:
https://github.com/fabiangreffrath/crispy-doom/blob/HEAD/src/doom/g_game.c#L724
I guess this works:
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1177,6 +1177,10 @@ void G_Ticker (void)
savegameslot =
(players[i].cmd.buttons & BTS_SAVEMASK)>>BTS_SAVESHIFT;
gameaction = ga_savegame;
+ // [crispy] un-pause immediately after saving
+ // (impossible to send save and pause specials within the same tic)
+ if (demorecording && paused)
+ sendpause = true;
break;
}
}
If you save a savegame while recording a demo, the game remains paused, with 'Pause' word on the screen. I have to ESC to the menu and then out of it to resume game. P.S. Checked Choco behavior: it doesn't get stuck in a pause after saving game in a demo, but the demo desyncs on playback.