X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=1c33d10b8ef21cceb3570c909ab408321434b2f4;hb=eb2a6b376490956d2f47cdbf66f1a5f7b5ade2e0;hp=6a424064b8ab1ceb3affabaee89edea1ec5dccea;hpb=aa24c59f7fea33d92180b087106258fa6c3c13cc;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 6a424064..1c33d10b 100644 --- a/src/game.c +++ b/src/game.c @@ -4997,7 +4997,7 @@ void GameEnd(void) game.LevelSolved_GameEnd = TRUE; - if (game.LevelSolved_SaveTape) + if (game.LevelSolved_SaveTape && !score_info_tape_play) { // make sure that request dialog to save tape does not open door again if (!global.use_envelope_request) @@ -5013,7 +5013,7 @@ void GameEnd(void) // if no tape is to be saved, close both doors simultaneously CloseDoor(DOOR_CLOSE_ALL); - if (level_editor_test_game) + if (level_editor_test_game || score_info_tape_play) { SetGameStatus(GAME_MODE_MAIN); @@ -13238,9 +13238,6 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) } } - player->last_jx = jx; - player->last_jy = jy; - if (Tile[jx][jy] == EL_EXIT_OPEN || Tile[jx][jy] == EL_EM_EXIT_OPEN || Tile[jx][jy] == EL_EM_EXIT_OPENING || @@ -13258,6 +13255,9 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) LevelSolved(); } + player->last_jx = jx; + player->last_jy = jy; + // this breaks one level: "machine", level 000 { int move_direction = player->MovDir; @@ -15679,7 +15679,7 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message) SetOverlayActive(FALSE); // door may still be open due to skipped or envelope style request - CloseDoor(DOOR_CLOSE_1); + CloseDoor(score_info_tape_play ? DOOR_CLOSE_ALL : DOOR_CLOSE_1); } if (network.enabled) @@ -15712,7 +15712,7 @@ void RequestQuitGame(boolean escape_key_pressed) boolean quick_quit = ((escape_key_pressed && !ask_on_escape) || level_editor_test_game); boolean skip_request = (game.all_players_gone || !setup.ask_on_quit_game || - quick_quit); + quick_quit || score_info_tape_play); RequestQuitGameExt(skip_request, quick_quit, "Do you really want to quit the game?"); @@ -16577,13 +16577,7 @@ static void HandleGameButtonsExt(int id, int button) case GAME_CTRL_ID_STOP: case GAME_CTRL_ID_PANEL_STOP: case GAME_CTRL_ID_TOUCH_STOP: - if (game_status == GAME_MODE_MAIN) - break; - - if (tape.playing) - TapeStop(); - else - RequestQuitGame(FALSE); + TapeStopGame(); break;