From 6c730723c8c2b5f15ffe967a02d8207d7bd23778 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 23 Sep 2024 19:37:08 +0200 Subject: [PATCH] fixed graphical bug with snapping player drawn as moving into explosion This fixes a graphical bug with smooth movement animation in the BD engine: When the player is snapping a tile that immediately after is replaced by an explosion next to the player, the player was drawn as moving into that explosion (without actually moving at all, as he was only snapping). This change fixes this bug by checking if the player actually moved. --- src/game_bd/bd_graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index 5814fcc9..f6548a12 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -688,7 +688,7 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d draw_from = game->drawing_buffer[new_y][new_x]; // handle special case of player running into enemy/explosion from top or left side - if (el_player(tile_last) && el_destroying(tile_from)) + if (el_player(tile_last) && !el_player(tile) && el_destroying(tile_from)) tile_from = tile_last; // handle special case of player digging or snapping clock (which gets replaced by sand) -- 2.34.1