From: Holger Schemel Date: Sun, 2 Nov 2003 23:23:47 +0000 (+0100) Subject: rnd-20031103-1-src X-Git-Tag: 3.0.7^2~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=30cc9a5cf3f338d51fd1bd45a2c3af22c416cd03;p=rocksndiamonds.git rnd-20031103-1-src --- diff --git a/src/conftime.h b/src/conftime.h index ebc81794..79313b94 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-11-02 13:42]" +#define COMPILE_DATE_STRING "[2003-11-02 22:04]" diff --git a/src/game.c b/src/game.c index a46368e1..3bb6aa59 100644 --- a/src/game.c +++ b/src/game.c @@ -98,6 +98,8 @@ RND(element_info[e].push_delay_random)) #define GET_NEW_MOVE_DELAY(e) ( (element_info[e].move_delay_fixed) + \ RND(element_info[e].move_delay_random)) +#define GET_MAX_MOVE_DELAY(e) ( (element_info[e].move_delay_fixed) + \ + (element_info[e].move_delay_random)) #define ELEMENT_CAN_ENTER_FIELD_GENERIC(e, x, y, condition) \ (IN_LEV_FIELD(x, y) && (IS_FREE(x, y) || \ @@ -7894,6 +7896,21 @@ int DigField(struct PlayerInfo *player, !(element == EL_SPRING && use_spring_bug)) return MF_NO_ACTION; +#if 1 + if (CAN_MOVE(element) && GET_MAX_MOVE_DELAY(element) == 0 && + ((move_direction & MV_VERTICAL && + ((element_info[element].move_pattern & MV_LEFT && + IN_LEV_FIELD(x - 1, y) && IS_FREE(x - 1, y)) || + (element_info[element].move_pattern & MV_RIGHT && + IN_LEV_FIELD(x + 1, y) && IS_FREE(x + 1, y)))) || + (move_direction & MV_HORIZONTAL && + ((element_info[element].move_pattern & MV_UP && + IN_LEV_FIELD(x, y - 1) && IS_FREE(x, y - 1)) || + (element_info[element].move_pattern & MV_DOWN && + IN_LEV_FIELD(x, y + 1) && IS_FREE(x, y + 1)))))) + return MF_NO_ACTION; +#endif + #if 1 /* do not push elements already moving away faster than player */ if (CAN_MOVE(element) && MovDir[x][y] == move_direction &&