E_P_VISUAL_EFFECT, // if the element can use a visual effect.
// used to check consistency of the code
E_P_PLAYER, // easier to find out if it is a player element
+ E_P_PLAYER_PUSHING, // player pushing some element
E_P_PLAYER_STIRRING, // player stirring the pot
E_P_MOVED_BY_CONVEYOR_TOP, // can be moved by conveyor belt
E_P_MOVED_BY_CONVEYOR_BOTTOM, // can be moved UNDER the conveyor belt
#define P_CAN_BE_HAMMERED (1 << E_P_CAN_BE_HAMMERED)
#define P_VISUAL_EFFECT (1 << E_P_VISUAL_EFFECT)
#define P_PLAYER (1 << E_P_PLAYER)
+#define P_PLAYER_PUSHING (1 << E_P_PLAYER_PUSHING)
#define P_PLAYER_STIRRING (1 << E_P_PLAYER_STIRRING)
#define P_MOVED_BY_CONVEYOR_TOP (1 << E_P_MOVED_BY_CONVEYOR_TOP)
#define P_MOVED_BY_CONVEYOR_BOTTOM (1 << E_P_MOVED_BY_CONVEYOR_BOTTOM)
},
{
O_PLAYER_PUSH_LEFT, O_PLAYER_PUSH_LEFT, N_("Player, pushing left"),
- P_PLAYER,
+ P_PLAYER | P_PLAYER_PUSHING,
NULL, 0, 392, -392, -392
},
{
O_PLAYER_PUSH_RIGHT, O_PLAYER_PUSH_RIGHT, N_("Player, pushing right"),
- P_PLAYER,
+ P_PLAYER | P_PLAYER_PUSHING,
NULL, 0, 400, -400, -400
},
{
return has_property(element, P_PLAYER);
}
+// returns true if the element is a player who is pushing some element
+static inline boolean el_player_pushing(const int element)
+{
+ return has_property(element, P_PLAYER_PUSHING);
+}
+
#if 0
// returns true if the element is walkable
static inline boolean el_walkable(const int element)
}
// player killed by lava or explosion was standing still before moving into lava or enemy
- if (el_player(tile_from))
+ if (el_player(tile_from) && !el_player_pushing(draw_from))
draw_from = (dir_from == GD_MV_LEFT ? O_PLAYER_LEFT :
dir_from == GD_MV_RIGHT ? O_PLAYER_RIGHT :
dir_from == GD_MV_UP ? O_PLAYER_UP :