X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=288ff5f16f9581afeafe387c410866f4a48a49ca;hb=d0e4766613f1c5b5685900eb4376ff73bf8581d3;hp=5c3cc9d3d36ec3072332dbea5ec6cd6e2ee2fe7d;hpb=00e52ef0b245eadf05f9dd416b29ebec5a47c767;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 5c3cc9d3..288ff5f1 100644 --- a/src/game.c +++ b/src/game.c @@ -3676,6 +3676,9 @@ void InitGame(void) else { SetGameStatus(GAME_MODE_PLAYING); + + // do not cover screen before fading out when starting from main menu + game_bd.cover_screen = FALSE; } if (level_editor_test_game) @@ -5161,10 +5164,19 @@ 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; + if (game.LevelSolved) game.LevelSolved_GameEnd = TRUE;