X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=d1bf2d7d0f2a334760196aab48140344b55d1ba2;hb=b08a9452f891ea0132aca72b79abead3f7784d1c;hp=a7e05b85d23b6fa6362a4f3a55dea4cec40d225c;hpb=38a107846ee06e0643bc50ee270962b3c8872cb0;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index a7e05b85..d1bf2d7d 100644 --- a/src/game.c +++ b/src/game.c @@ -3095,6 +3095,9 @@ static void InitGameEngine(void) game_em.use_single_button = (game.engine_version > VERSION_IDENT(4,0,0,2)); + game_em.use_push_delay = + (game.engine_version > VERSION_IDENT(4,3,7,1)); + game_em.use_snap_key_bug = (game.engine_version < VERSION_IDENT(4,0,1,0)); @@ -3867,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); @@ -4546,9 +4551,7 @@ void InitGame(void) } game.restart_level = FALSE; - game.request_active = FALSE; - game.request_active_or_moving = FALSE; if (level.game_engine_type == GAME_ENGINE_TYPE_MM) InitGameActions_MM(); @@ -15801,10 +15804,14 @@ boolean CheckRestartGame(void) return FALSE; } - // do not handle game over if request dialog is already active + // do not ask to play again if request dialog is already active 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; @@ -15813,6 +15820,8 @@ boolean CheckRestartGame(void) if (!setup.ask_on_game_over) return FALSE; + game.RestartGameRequested = TRUE; + RequestRestartGame(); return TRUE;