draw = elemdrawing[actual];
}
- // draw special graphics if player is pushing something
+ // draw special graphics if player is pushing something (but not while stirring the pot)
if (use_bd_pushing_graphics() &&
(cave->last_direction == GD_MV_LEFT || cave->last_direction == GD_MV_RIGHT) &&
- is_player(cave, x, y) && can_be_pushed(cave, x, y, cave->last_direction))
+ is_player(cave, x, y) && can_be_pushed(cave, x, y, cave->last_direction) &&
+ !is_player_stirring(cave, x, y))
{
// special check needed when smooth game element movements selected in setup menu:
// last element must either be player (before pushing) or pushable element (while pushing)
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_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_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)
}, // is not a real player! so active x, y will not find it. no P_PLAYER bit!
{
O_PLAYER_STIRRING, O_PLAYER_STIRRING, N_("Player stirring"),
- P_BLOWS_UP_FLIES | P_EXPLODES_BY_HIT | P_PLAYER,
+ P_BLOWS_UP_FLIES | P_EXPLODES_BY_HIT | P_PLAYER | P_PLAYER_STIRRING,
"GUYSTIRRING", 0, 256, -256, -256
},
return has_property(get(cave, x, y), P_PLAYER);
}
+// returns true if the element is a player stirring the pot
+boolean is_player_stirring(const GdCave *cave, const int x, const int y)
+{
+ return has_property(get(cave, x, y), P_PLAYER_STIRRING);
+}
+
// returns true if the element is a player (normal player, player glued, player with bomb) (+ dir)
static inline boolean is_player_dir(const GdCave *cave, const int x, const int y,
const GdDirection dir)
GdElement scanned_pair(GdElement of_what);
GdElement non_scanned_pair(GdElement of_what);
boolean is_player(const GdCave *cave, const int x, const int y);
+boolean is_player_stirring(const GdCave *cave, const int x, const int y);
boolean can_be_pushed(const GdCave *cave, const int x, const int y, const GdDirection dir);
GdDirection gd_direction_from_keypress(boolean up, boolean down, boolean left, boolean right);
void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, boolean suicide);