X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=ab66bdf21921c5f72f565bc67fea60ec5f2cafbb;hb=72e44014938c9042261b67213a6cd37b7a17488f;hp=8582ac846da647c0845d04e6fe45ce27cbfdb786;hpb=09f90416c51f96c37bf133690eb3dcdaf6dd997c;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 8582ac84..ab66bdf2 100644 --- a/src/tools.c +++ b/src/tools.c @@ -745,16 +745,20 @@ void DrawPlayer(struct PlayerInfo *player) } /* ----------------------------------------------------------------------- */ - /* draw elements that stay over the player */ + /* draw elements the player is just walking/passing through/under */ /* ----------------------------------------------------------------------- */ /* handle the field the player is leaving ... */ - if (player_is_moving && IS_OVER_PLAYER(last_element)) + if (player_is_moving && IS_ACCESSIBLE_INSIDE(last_element)) DrawLevelField(last_jx, last_jy); + else if (player_is_moving && IS_ACCESSIBLE_UNDER(last_element)) + DrawLevelFieldThruMask(last_jx, last_jy); /* ... and the field the player is entering */ - if (IS_OVER_PLAYER(element)) + if (IS_ACCESSIBLE_INSIDE(element)) DrawLevelField(jx, jy); + else if (IS_ACCESSIBLE_UNDER(element)) + DrawLevelFieldThruMask(jx, jy); if (setup.direct_draw) {