From: Holger Schemel Date: Sat, 31 Aug 2024 19:03:24 +0000 (+0200) Subject: fixed bug with restarting game after playing unsuccessful tape X-Git-Tag: 4.4.0.0-test-4~282 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7d7d12a1adb2b1d84eece1f787d785171eb0413a;p=rocksndiamonds.git 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. --- 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)