From 7b3165759706fa83cf3aedcdff0d0a2a91ee0d7a Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 22 Jan 2025 08:46:12 +0100 Subject: [PATCH] fixed fast-forwarding BD game engine when skipping player hatching Without this change, tape replay times with "skip hatching" enabled or disabled differ by one frame, causing failed tape validations on the high score server for tapes recorded with "skip hatching" enabled. --- src/game_bd/main_bd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game_bd/main_bd.c b/src/game_bd/main_bd.c index 290b6cb5..1c80dc01 100644 --- a/src/game_bd/main_bd.c +++ b/src/game_bd/main_bd.c @@ -415,21 +415,21 @@ void GameActions_BD(byte action[MAX_PLAYERS]) player_x, player_y); + play_game_func(game_bd.game, action[0]); + if (setup.bd_skip_hatching && !game_bd.game->cave->hatched && game_bd.game->state_counter == GAME_INT_CAVE_RUNNING) { // fast-forward game engine until player hatched while (!game_bd.game->cave->hatched) { - play_game_func(game_bd.game, 0); - // also record or replay tape action during fast-forward action = TapeCorrectAction_BD(action); + + play_game_func(game_bd.game, 0); } } - play_game_func(game_bd.game, action[0]); - // scroll without iterating engine if player out of sight (mainly due to wrap-around) // (this is needed to prevent broken tapes in case of viewport or tile size changes) while (game_bd.game->out_of_window) -- 2.34.1