improved checking for smooth movement animation in BD engine
authorHolger Schemel <holger.schemel@virtion.de>
Mon, 23 Sep 2024 17:33:35 +0000 (19:33 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Mon, 23 Sep 2024 17:35:57 +0000 (19:35 +0200)
src/game_bd/bd_graphics.c

index bfa5b9ad6da785ed032e55a6410ce605fe49acd8..5814fcc91fdfa8eb08867aa5c69717c752d5fe7a 100644 (file)
@@ -746,9 +746,9 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d
 
   // do not use smooth movement animation for game elements that cannot move smoothly
   // (but handle special case of player digging or snapping diggable element, like sand)
-  if (!el_smooth_movable(tile_from) &&
-      !el_smooth_movable(tile_to) &&
-      !el_diggable(tile_last))
+  if (!(is_moving_from && el_smooth_movable(tile_from)) &&
+      !(is_moving_to   && el_smooth_movable(tile_to)) &&
+      !(is_moving_to   && el_diggable(tile_last)))
     use_smooth_movements = FALSE;
 
 #if DO_GFX_SANITY_CHECK