From 7d7d12a1adb2b1d84eece1f787d785171eb0413a Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 31 Aug 2024 21:03:24 +0200 Subject: [PATCH] fixed bug with restarting game after playing unsuccessful tape When losing a game, pressing "space" or "enter" key before being asked to play again restarts the game. When replaying a tape, a new game was started instead of returning to the main menu. This commit fixes this bug. --- src/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index c5a47a9f..92460cea 100644 --- a/src/game.c +++ b/src/game.c @@ -5188,7 +5188,7 @@ void GameEnd(void) // "game over" (if automatically asking for restarting the game is disabled in setup) // do not handle game end if game over and automatically asking for game restart - if (game_over && setup.ask_on_game_over) + if (game.GamePlayed && 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) -- 2.34.1