rnd-20071031-1-src
[rocksndiamonds.git] / src / game.c
index 76a9952991770243f7d206eb143d2a11d11adea9..7e5350234b25ac6bffbcd0e09fceaa3460a89954 100644 (file)
@@ -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)