X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=1966bb3c6c03ec01db36464d7fce410a6fbedd9a;hb=ee2ea277015cd6d41e5314bbdc18229bd60ca1de;hp=852f307f687acc6b6abe489fa64ac8fc4f3e6de8;hpb=a3d3dca44696b194dbe3f49a97d8c92d92b42ecf;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 852f307f..1966bb3c 100644 --- a/src/game.c +++ b/src/game.c @@ -2286,7 +2286,7 @@ static void UpdateGameControlValues(void) int time = (game.LevelSolved ? game.LevelSolved_CountingTime : level.game_engine_type == GAME_ENGINE_TYPE_BD ? - game_bd.time_played : + game_bd.time_left : level.game_engine_type == GAME_ENGINE_TYPE_EM ? game_em.lev->time : level.game_engine_type == GAME_ENGINE_TYPE_SP ? @@ -4862,7 +4862,7 @@ void InitAmoebaNr(int x, int y) static void LevelSolved_SetFinalGameValues(void) { - game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_played : + game.time_final = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.time_left : game.no_level_time_limit ? TimePlayed : TimeLeft); game.score_time_final = (level.use_step_counter ? TimePlayed : TimePlayed * FRAMES_PER_SECOND + TimeFrames); @@ -5171,7 +5171,16 @@ void GameEnd(void) // do not handle game end if game over and automatically asking for game restart if (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) + + CloseDoor(DOOR_CLOSE_1); + + StartGameActions(network.enabled, setup.autorecord, level.random_seed); + return; + } // do not handle game end if request dialog is already active if (checkRequestActive())