X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Ftools.c;h=5e5a2e1d01708640a63511faab85a617e596d843;hb=7ecd8eddc03023228a062ced889f5a4a83eb7d71;hp=541787c052976539b76023aa02290eacc1f284fd;hpb=5c1d81a8afcb2e409e4d207bbc2cb2853e5e3b49;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 541787c0..5e5a2e1d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4248,6 +4248,9 @@ static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage) if (!player->is_pushing || !player->is_moving) return; + if (Tile[next_jx][next_jy] == EL_EXPLOSION) + return; + int gfx_frame = GfxFrame[jx][jy]; if (!IS_MOVING(jx, jy)) // push movement already finished @@ -4269,13 +4272,9 @@ static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage) DrawLevelElement(jx, jy, Back[jx][jy]); else DrawLevelElement(jx, jy, EL_EMPTY); - - if (Back[next_jx][next_jy]) - DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]); - else - DrawLevelElement(next_jx, next_jy, EL_EMPTY); } - else if (Back[next_jx][next_jy]) + + if (Back[next_jx][next_jy]) DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]); else DrawLevelElement(next_jx, next_jy, EL_EMPTY); @@ -9428,6 +9427,17 @@ int getGraphicInfo_Delay(int graphic) return graphic_info[graphic].anim_delay; } +boolean getGraphicInfo_NewFrame(int x, int y, int graphic) +{ + if (!IS_NEW_FRAME(GfxFrame[x][y], graphic)) + return FALSE; + + if (ANIM_MODE(graphic) & (ANIM_TILED | ANIM_RANDOM_STATIC)) + return FALSE; + + return TRUE; +} + void PlayMenuSoundExt(int sound) { if (sound == SND_UNDEFINED)