From bc81bd2ee202b635901f1b24741bc0a715769d3f Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 5 May 2024 20:57:41 +0200 Subject: [PATCH] fixed handling enter key just before asking to play again --- src/game.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game.c b/src/game.c index 852f307f..831ec901 100644 --- a/src/game.c +++ b/src/game.c @@ -5171,7 +5171,16 @@ void GameEnd(void) // do not handle game end if game over and automatically asking for game restart if (game_over && setup.ask_on_game_over) + { + // (this is a special case: player pressed "return" key or fire button shortly before + // automatically asking to restart the game, so skip asking and restart right away) + + CloseDoor(DOOR_CLOSE_1); + + StartGameActions(network.enabled, setup.autorecord, level.random_seed); + return; + } // do not handle game end if request dialog is already active if (checkRequestActive()) -- 2.34.1