X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=d1bf2d7d0f2a334760196aab48140344b55d1ba2;hb=e498c78309eb6b3b2cc1820833120862569858b7;hp=a2dcd13dc1de0a4dda3060a3182d7c83cd343223;hpb=27d25dccefb519f3e710c21b025bfdfe9a991ef8;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index a2dcd13d..d1bf2d7d 100644 --- a/src/game.c +++ b/src/game.c @@ -3870,6 +3870,8 @@ void InitGame(void) game.LevelSolved_CountingScore = 0; game.LevelSolved_CountingHealth = 0; + game.RestartGameRequested = FALSE; + game.panel.active = TRUE; game.no_level_time_limit = (level.time == 0); @@ -15806,6 +15808,10 @@ boolean CheckRestartGame(void) if (game.request_active) return FALSE; + // do not ask to play again if request dialog already handled + if (game.RestartGameRequested) + return FALSE; + // do not ask to play again if game was never actually played if (!game.GamePlayed) return FALSE; @@ -15814,6 +15820,8 @@ boolean CheckRestartGame(void) if (!setup.ask_on_game_over) return FALSE; + game.RestartGameRequested = TRUE; + RequestRestartGame(); return TRUE;