fixed handling enter key just before asking to play again
[rocksndiamonds.git] / src / game.c
index 852f307f687acc6b6abe489fa64ac8fc4f3e6de8..831ec9010a5a0a4a9460d471bb8aaf2574b53045 100644 (file)
@@ -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())