added support for graphic animations of empty space elements
authorHolger Schemel <info@artsoft.org>
Fri, 26 Nov 2021 23:11:11 +0000 (00:11 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 22 Jan 2022 16:58:29 +0000 (17:58 +0100)
src/game.c
src/tools.c

index 491d4e9b541be0f3ca1ab48423f3ac1e16965719..e906d2362d832236cd08b141d0f48dd7a06a8fbe 100644 (file)
@@ -12299,6 +12299,9 @@ void GameActions_RND(void)
     graphic = el_act_dir2img(element, GfxAction[x][y], GfxDir[x][y]);
     last_gfx_frame = GfxFrame[x][y];
 
+    if (element == EL_EMPTY)
+      graphic = el2img(GfxElementEmpty[x][y]);
+
     ResetGfxFrame(x, y);
 
     if (GfxFrame[x][y] != last_gfx_frame && !Stop[x][y])
index a3e5306835f7082e83a21f22c3dc053f13f5257d..ebcb47305133d67876d167c04b9d604aa6e40ff8 100644 (file)
@@ -3960,6 +3960,9 @@ void DrawLevelGraphicAnimationIfNeeded(int x, int y, int graphic)
   if (!IN_LEV_FIELD(x, y) || !IN_SCR_FIELD(sx, sy))
     return;
 
+  if (Tile[x][y] == EL_EMPTY)
+    graphic = el2img(GfxElementEmpty[x][y]);
+
   if (!IS_NEW_FRAME(GfxFrame[x][y], graphic))
     return;