From: Holger Schemel Date: Mon, 23 Sep 2024 17:37:08 +0000 (+0200) Subject: fixed graphical bug with snapping player drawn as moving into explosion X-Git-Tag: 4.4.0.0-test-4~203 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=6c730723c8c2b5f15ffe967a02d8207d7bd23778;p=rocksndiamonds.git 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. --- 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)