From 894fd14dfe16f1729b516229bbd640dc8bb3de6a Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 5 Nov 2024 19:31:43 +0100 Subject: [PATCH] fixed graphical bug when pushing rocks onto BD style conveyor belts When pushing a rock onto a right-moving conveyor belt from the left side using the BD engine and using the "buggy conveyor belts" editor setting (used by native BD caves by default), the player pushing that rock was displayed with a broken animation when using "smooth movement animations" for the BD engine. This change fixes this graphical bug. (The first part fixes placing a space, which is not a movement, while the second part seems not to be required otherwise anyway.) --- src/game_bd/bd_caveengine.c | 4 ++-- src/game_bd/bd_graphics.c | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index b4c9219e..c6b8a30b 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -3684,7 +3684,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, if (game_bd.game->dir_buffer_to[old_y][old_x] != move_dir || cave->conveyor_belts_buggy) { - store_dir(cave, x, y, GD_MV_UP, O_SPACE); // place a space ... + store(cave, old_x, old_y, O_SPACE); // place a space ... store_dir(cave, old_x, old_y, move_dir, tile); // and move element. } } @@ -3719,7 +3719,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, if (game_bd.game->dir_buffer_to[old_y][old_x] != move_dir || cave->conveyor_belts_buggy) { - store_dir(cave, x, y, GD_MV_DOWN, O_SPACE); // place a space ... + store(cave, old_x, old_y, O_SPACE); // place a space ... store_dir(cave, old_x, old_y, move_dir, tile); // and move element. } } diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index 74d6b6e9..69c0344e 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -658,10 +658,6 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d if (cave->player_state == GD_PL_EXITED) use_smooth_movements = FALSE; - // never treat empty space as "moving" (source tile if player is snapping) - if (tile_from == O_SPACE) - use_smooth_movements = FALSE; - // do not use smooth movement animation for player stirring the pot if (tile_from == O_PLAYER_STIRRING || tile_to == O_PLAYER_STIRRING) use_smooth_movements = FALSE; -- 2.34.1