From: Holger Schemel Date: Mon, 28 Nov 2016 21:39:56 +0000 (+0100) Subject: fixed acid animation for elements falling/moving into (GFX engine change) X-Git-Tag: 4.0.0.0~15 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=6da19745f8b8aa6f8cc02b59da507082fe509c5b;p=rocksndiamonds.git fixed acid animation for elements falling/moving into (GFX engine change) --- 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))