From: Holger Schemel Date: Sun, 5 May 2024 18:57:41 +0000 (+0200) Subject: fixed handling enter key just before asking to play again X-Git-Tag: 4.4.0.0-test-1~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=bc81bd2ee202b635901f1b24741bc0a715769d3f;p=rocksndiamonds.git fixed handling enter key just before asking to play again --- 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())