rnd-20040402-3-src
authorHolger Schemel <info@artsoft.org>
Fri, 2 Apr 2004 19:34:03 +0000 (21:34 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:46:46 +0000 (10:46 +0200)
src/conftime.h
src/game.c

index 4e8894bfa7d71ec9879151c4c5269b0228ed9faf..bbe1253ad7af9d3364ec1ee3810e81216c907772 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-04-02 01:42]"
+#define COMPILE_DATE_STRING "[2004-04-02 08:58]"
index adc212db11a05ba46dc5674929f67c4320784271..a19a1a86ca48b6b20856ea284592fd3b73361fcc 100644 (file)
@@ -6080,6 +6080,26 @@ void ContinueMoving(int x, int y)
       (newy == lev_fieldy - 1 || !IS_FREE(x, newy + 1)))
     Impact(x, newy);
 
+#if 1
+  if (pushed_by_player)
+  {
+    static int trigger_sides[4] =
+    {
+      CH_SIDE_RIGHT,   /* moving left  */
+      CH_SIDE_LEFT,    /* moving right */
+      CH_SIDE_BOTTOM,  /* moving up    */
+      CH_SIDE_TOP,     /* moving down  */
+    };
+    int dig_side = trigger_sides[MV_DIR_BIT(direction)];
+    struct PlayerInfo *player = PLAYERINFO(x, y);
+
+    CheckElementChangeByPlayer(newx, newy, element, CE_PUSHED_BY_PLAYER,
+                              player->index_bit, dig_side);
+    CheckTriggeredElementChangeByPlayer(newx,newy,element,CE_OTHER_GETS_PUSHED,
+                                       player->index_bit, dig_side);
+  }
+#endif
+
 #if 1
   TestIfElementTouchesCustomElement(x, y);     /* empty or new element */
 #endif
@@ -10892,6 +10912,10 @@ int DigField(struct PlayerInfo *player,
        else
          player->push_delay_value = -1;        /* get new value later */
 
+#if 1
+       /* check for element change _after_ element has been pushed! */
+#else
+
 #if 1
       /* !!! TEST ONLY !!! */
        CheckElementChangeByPlayer(x, y, element, CE_PUSHED_BY_PLAYER,
@@ -10903,6 +10927,7 @@ int DigField(struct PlayerInfo *player,
                                            player->index_bit, dig_side);
        CheckElementChangeByPlayer(x, y, element, CE_PUSHED_BY_PLAYER,
                                   player->index_bit, dig_side);
+#endif
 #endif
 
        break;