From b0c3bb42e4a0baf41242190a2855c3623267899b Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 27 Nov 2021 00:11:11 +0100 Subject: [PATCH] added support for graphic animations of empty space elements --- src/game.c | 3 +++ src/tools.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/game.c b/src/game.c index 491d4e9b..e906d236 100644 --- a/src/game.c +++ b/src/game.c @@ -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]) diff --git a/src/tools.c b/src/tools.c index a3e53068..ebcb4730 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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; -- 2.34.1