X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=7e5350234b25ac6bffbcd0e09fceaa3460a89954;hb=ed9b77daec8c9dbddc04f08c6f2de24135415e44;hp=76a9952991770243f7d206eb143d2a11d11adea9;hpb=80e96bb2c18af80bdf42240afb36af0e507d4f3e;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 76a99529..7e535023 100644 --- a/src/game.c +++ b/src/game.c @@ -14534,13 +14534,6 @@ static int DigField(struct PlayerInfo *player, CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty))))) return MP_NO_ACTION; - if (IS_CUSTOM_ELEMENT(element) && - CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty)) - { - if (!DigFieldByCE(nextx, nexty, element)) - return MP_NO_ACTION; - } - if (!checkDiagonalPushing(player, x, y, real_dx, real_dy)) return MP_NO_ACTION; @@ -14558,6 +14551,13 @@ static int DigField(struct PlayerInfo *player, return MP_NO_ACTION; } + if (IS_CUSTOM_ELEMENT(element) && + CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty)) + { + if (!DigFieldByCE(nextx, nexty, element)) + return MP_NO_ACTION; + } + if (IS_SB_ELEMENT(element)) { if (element == EL_SOKOBAN_FIELD_FULL)