From 6da19745f8b8aa6f8cc02b59da507082fe509c5b Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 28 Nov 2016 22:39:56 +0100 Subject: [PATCH 1/1] fixed acid animation for elements falling/moving into (GFX engine change) --- src/game.c | 10 +++++++--- src/tools.c | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/game.c b/src/game.c index 79307407..de245df5 100644 --- a/src/game.c +++ b/src/game.c @@ -11483,7 +11483,7 @@ void GameActions_RND() ResetGfxFrame(x, y); - if (GfxFrame[x][y] != last_gfx_frame) + if (GfxFrame[x][y] != last_gfx_frame && !Stop[x][y]) DrawLevelGraphicAnimation(x, y, graphic); if (ANIM_MODE(graphic) == ANIM_RANDOM && @@ -11529,8 +11529,12 @@ void GameActions_RND() if (IS_GEM(element) || element == EL_SP_INFOTRON) TEST_DrawTwinkleOnField(x, y); } - else if ((element == EL_ACID || - element == EL_EXIT_OPEN || + else if (element == EL_ACID) + { + if (!Stop[x][y]) + DrawLevelGraphicAnimationIfNeeded(x, y, graphic); + } + else if ((element == EL_EXIT_OPEN || element == EL_EM_EXIT_OPEN || element == EL_SP_EXIT_OPEN || element == EL_STEEL_EXIT_OPEN || diff --git a/src/tools.c b/src/tools.c index 2ca18cf6..133a8265 100644 --- a/src/tools.c +++ b/src/tools.c @@ -2322,6 +2322,10 @@ void DrawScreenField(int x, int y) int newly = ly + (dir == MV_UP ? -1 : dir == MV_DOWN ? +1 : 0); DrawLevelElementThruMask(newlx, newly, EL_ACID); + + // prevent target field from being drawn again (but without masking) + // (this would happen if target field is scanned after moving element) + Stop[newlx][newly] = TRUE; } } else if (IS_BLOCKED(lx, ly)) -- 2.34.1