moved code for drawing background of push target field to correct location
authorHolger Schemel <info@artsoft.org>
Thu, 12 Jan 2023 17:08:17 +0000 (18:08 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 12 Jan 2023 17:08:17 +0000 (18:08 +0100)
src/tools.c

index 5fb84526d33c99386810b2fb5ebe1cfee6006b19..541787c052976539b76023aa02290eacc1f284fd 100644 (file)
@@ -4191,9 +4191,6 @@ static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage)
       DrawDynamite(last_jx, last_jy);
     else
       DrawLevelField(last_jx, last_jy);
-
-    if (player->is_pushing && IN_SCR_FIELD(SCREENX(next_jx), SCREENY(next_jy)))
-      DrawLevelElement(next_jx, next_jy, EL_EMPTY);
   }
   else if (drawing_stage == DRAW_PLAYER_STAGE_FIELD_UNDER_PLAYER)
   {
@@ -4280,6 +4277,8 @@ static void DrawPlayerExt(struct PlayerInfo *player, int drawing_stage)
     }
     else if (Back[next_jx][next_jy])
       DrawLevelElement(next_jx, next_jy, Back[next_jx][next_jy]);
+    else
+      DrawLevelElement(next_jx, next_jy, EL_EMPTY);
 
     int px = SCREENX(jx), py = SCREENY(jy);
     int pxx = (TILEX - ABS(sxx)) * dx;