From: Holger Schemel Date: Fri, 5 Apr 2024 15:46:20 +0000 (+0200) Subject: disabled ending lost game when asking for game restart is configured X-Git-Tag: 4.4.0.0-test-1~103 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8e65ad775c169be345f846f9a3cb1be4bddbd4ce;p=rocksndiamonds.git disabled ending lost game when asking for game restart is configured --- diff --git a/src/game.c b/src/game.c index ec86a61f..506def33 100644 --- a/src/game.c +++ b/src/game.c @@ -5161,10 +5161,15 @@ void GameEnd(void) // used instead of "level_nr" (needed for network games) int last_level_nr = levelset.level_nr; boolean tape_saved = FALSE; + boolean game_over = checkGameFailed(); // Important note: This function is not only called after "GameWon()", but also after // "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) + return; + // do not handle game end if request dialog is already active if (checkRequestActive()) return;