rnd-20060805-4-src
[rocksndiamonds.git] / src / game.c
index 2b4c7c0d02b75cf1a5453c9d2c83c24057d7fa79..3ea77684d612d9913c01cf3afeff7201c1809c37 100644 (file)
@@ -49,6 +49,9 @@
 
 #define USE_QUICKSAND_IMPACT_BUGFIX    (USE_NEW_STUFF          * 0)
 
+#define USE_CODE_THAT_BREAKS_SNAKE_BITE        (USE_NEW_STUFF          * 1)
+
+
 /* for DigField() */
 #define DF_NO_PUSH             0
 #define DF_DIG                 1
@@ -8484,7 +8487,12 @@ static void CreateFieldExt(int x, int y, int element, boolean is_change)
 #endif
   boolean new_element_is_player = ELEM_IS_PLAYER(new_element);
   boolean add_player_onto_element = (new_element_is_player &&
+#if USE_CODE_THAT_BREAKS_SNAKE_BITE
+                                    /* this breaks SnakeBite when a snake is
+                                       halfway through a door that closes */
+                                    /* NOW FIXED AT LEVEL INIT IN files.c */
                                     new_element != EL_SOKOBAN_FIELD_PLAYER &&
+#endif
                                     IS_WALKABLE(old_element));
 
 #if 0
@@ -10401,7 +10409,7 @@ static void CheckGravityMovement(struct PlayerInfo *player)
   {
     int move_dir_horizontal = player->effective_action & MV_HORIZONTAL;
     int move_dir_vertical   = player->effective_action & MV_VERTICAL;
-    boolean player_is_snapping = player->effective_action & JOY_BUTTON_1;
+    boolean player_is_snapping = (player->effective_action & JOY_BUTTON_1);
     int jx = player->jx, jy = player->jy;
     boolean player_is_moving_to_valid_field =
       (!player_is_snapping &&