#define USE_GFX_RESET_GFX_ANIMATION (USE_NEW_STUFF * 1)
#define USE_BOTH_SWITCHGATE_SWITCHES (USE_NEW_STUFF * 1)
#define USE_PLAYER_GRAVITY (USE_NEW_STUFF * 1)
+#define USE_FIXED_BORDER_RUNNING_GFX (USE_NEW_STUFF * 1)
+#define USE_QUICKSAND_BD_ROCK_BUGFIX (USE_NEW_STUFF * 0)
#define USE_QUICKSAND_IMPACT_BUGFIX (USE_NEW_STUFF * 0)
{
if (!IS_CUSTOM_ELEMENT(i))
{
+#if 1
+ /* set default push delay values (corrected since version 3.0.7-1) */
+ if (game.engine_version < VERSION_IDENT(3,0,7,1))
+ {
+ element_info[i].push_delay_fixed = 2;
+ element_info[i].push_delay_random = 8;
+ }
+ else
+ {
+ element_info[i].push_delay_fixed = 8;
+ element_info[i].push_delay_random = 8;
+ }
+#else
element_info[i].push_delay_fixed = game.default_push_delay_fixed;
element_info[i].push_delay_random = game.default_push_delay_random;
+#endif
}
}
player->last_move_dir = MV_NONE;
+ player->is_active = FALSE;
+
player->is_waiting = FALSE;
player->is_moving = FALSE;
player->is_auto_moving = FALSE;
started_moving = TRUE;
Feld[x][y] = EL_QUICKSAND_EMPTYING;
+#if USE_QUICKSAND_BD_ROCK_BUGFIX
+ if (Store[x][y] != EL_ROCK && Store[x][y] != EL_BD_ROCK)
+ Store[x][y] = EL_ROCK;
+#else
Store[x][y] = EL_ROCK;
+#endif
PlayLevelSoundAction(x, y, ACTION_EMPTYING);
}
if (element == EL_EXPANDABLE_WALL_HORIZONTAL ||
element == EL_EXPANDABLE_WALL_ANY ||
- element == EL_EXPANDABLE_WALL)
+ element == EL_EXPANDABLE_WALL ||
+ element == EL_BD_EXPANDABLE_WALL)
{
if (links_frei)
{
#if USE_NEW_CUSTOM_VALUE
int last_ce_value = CustomValue[x][y];
#endif
- boolean add_player = (ELEM_IS_PLAYER(new_element) &&
- IS_WALKABLE(old_element));
+ boolean new_element_is_player = ELEM_IS_PLAYER(new_element);
+ boolean add_player_onto_element = (new_element_is_player &&
+ new_element != EL_SOKOBAN_FIELD_PLAYER &&
+ IS_WALKABLE(old_element));
#if 0
/* check if element under the player changes from accessible to unaccessible
}
#endif
- if (!add_player)
+ if (!add_player_onto_element)
{
if (IS_MOVING(x, y) || IS_BLOCKED(x, y))
RemoveMovingField(x, y);
#endif
/* "ChangeCount" not set yet to allow "entered by player" change one time */
- if (ELEM_IS_PLAYER(new_element))
+ if (new_element_is_player)
RelocatePlayer(x, y, new_element);
if (is_change)
else if (element == EL_EXPANDABLE_WALL ||
element == EL_EXPANDABLE_WALL_HORIZONTAL ||
element == EL_EXPANDABLE_WALL_VERTICAL ||
- element == EL_EXPANDABLE_WALL_ANY)
+ element == EL_EXPANDABLE_WALL_ANY ||
+ element == EL_BD_EXPANDABLE_WALL)
MauerAbleger(x, y);
else if (element == EL_FLAMES)
CheckForDragon(x, y);
player->move_delay_value = original_move_delay_value;
}
+ player->is_active = FALSE;
+
if (player->last_move_dir & MV_HORIZONTAL)
{
if (!(moved |= MovePlayerOneStep(player, 0, dy, dx, dy)))
moved |= MovePlayerOneStep(player, 0, dy, dx, dy);
}
+#if USE_FIXED_BORDER_RUNNING_GFX
+ if (!moved && !player->is_active)
+ {
+ player->is_moving = FALSE;
+ player->is_digging = FALSE;
+ player->is_collecting = FALSE;
+ player->is_snapping = FALSE;
+ player->is_pushing = FALSE;
+ }
+#endif
+
jx = player->jx;
jy = player->jy;
game.engine_version >= VERSION_IDENT(2,2,0,0))
old_element = Back[jx][jy];
+ /* checking here causes player to move into acid even if the current field
+ cannot be left to that direction */
#if 0
#if USE_FIXED_DONT_RUN_INTO
if (player_can_move && DONT_RUN_INTO(element))
#endif
#endif
+#if 1 /* ------------------------------ NEW ------------------------------ */
+
+ if (IS_WALKABLE(old_element) && !ACCESS_FROM(old_element, move_direction))
+ return MP_NO_ACTION; /* field has no opening in this direction */
+
+ if (IS_PASSABLE(old_element) && !ACCESS_FROM(old_element,opposite_direction))
+ return MP_NO_ACTION; /* field has no opening in this direction */
+
+#if USE_FIXED_DONT_RUN_INTO
+ if (player_can_move && element == EL_ACID && move_direction == MV_DOWN)
+ {
+ SplashAcid(x, y);
+#if 1
+ Feld[jx][jy] = player->artwork_element;
+#else
+ Feld[jx][jy] = EL_PLAYER_1;
+#endif
+ InitMovingField(jx, jy, MV_DOWN);
+ Store[jx][jy] = EL_ACID;
+ ContinueMoving(jx, jy);
+ BuryPlayer(player);
+
+ return MP_DONT_RUN_INTO;
+ }
+#endif
+
+#if USE_FIXED_DONT_RUN_INTO
+ if (player_can_move && DONT_RUN_INTO(element))
+ {
+ TestIfPlayerRunsIntoBadThing(jx, jy, player->MovDir);
+
+ return MP_DONT_RUN_INTO;
+ }
+#endif
+
+#else /* ------------------------------ OLD ------------------------------ */
+
#if 1
#if USE_FIXED_DONT_RUN_INTO
if (player_can_move && DONT_RUN_INTO(element))
if (IS_PASSABLE(old_element) && !ACCESS_FROM(old_element,opposite_direction))
return MP_NO_ACTION; /* field has no opening in this direction */
+ /* checking here causes player to explode when moving into acid */
#if 1
#if USE_FIXED_DONT_RUN_INTO
if (player_can_move && element == EL_ACID && move_direction == MV_DOWN)
#endif
#endif
+#endif /* ------------------------------ END ------------------------------ */
+
#if 0
#if USE_FIXED_DONT_RUN_INTO
if (player_can_move && DONT_RUN_INTO(element))
}
player->is_pushing = TRUE;
+ player->is_active = TRUE;
if (!(IN_LEV_FIELD(nextx, nexty) &&
(IS_FREE(nextx, nexty) ||
if (is_player) /* function can also be called by EL_PENGUIN */
{
if (Feld[x][y] != element) /* really digged/collected something */
+ {
player->is_collecting = !player->is_digging;
+ player->is_active = TRUE;
+ }
}
return MP_MOVING;
return FALSE;
player->is_snapping = TRUE;
+ player->is_active = TRUE;
if (player->MovPos == 0)
{