From: Holger Schemel Date: Wed, 22 Jan 2025 07:46:12 +0000 (+0100) Subject: fixed fast-forwarding BD game engine when skipping player hatching X-Git-Tag: 4.4.0.3~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=7b3165759706fa83cf3aedcdff0d0a2a91ee0d7a;p=rocksndiamonds.git 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. --- 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)