From ed9b77daec8c9dbddc04f08c6f2de24135415e44 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 31 Oct 2007 21:18:37 +0100 Subject: [PATCH] rnd-20071031-1-src * fixed bug in new "can dig" feature (see below) so that an unsuccessful try to push something (due to push delay) does not cause a dig action --- ChangeLog | 4 ++++ src/conftime.h | 2 +- src/game.c | 14 +++++++------- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bbd3b47..c70b2195 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-31 + * fixed bug in new "can dig" feature (see below) so that an unsuccessful + try to push something (due to push delay) does not cause a dig action + 2007-10-29 * fixed bug with reference elements used as trigger elements on custom element change pages not being recognized diff --git a/src/conftime.h b/src/conftime.h index 9d961e76..adb97f7e 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-10-30 01:13" +#define COMPILE_DATE_STRING "2007-10-31 20:50" diff --git a/src/game.c b/src/game.c index 76a99529..7e535023 100644 --- a/src/game.c +++ b/src/game.c @@ -14534,13 +14534,6 @@ static int DigField(struct PlayerInfo *player, CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty))))) return MP_NO_ACTION; - if (IS_CUSTOM_ELEMENT(element) && - CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty)) - { - if (!DigFieldByCE(nextx, nexty, element)) - return MP_NO_ACTION; - } - if (!checkDiagonalPushing(player, x, y, real_dx, real_dy)) return MP_NO_ACTION; @@ -14558,6 +14551,13 @@ static int DigField(struct PlayerInfo *player, return MP_NO_ACTION; } + if (IS_CUSTOM_ELEMENT(element) && + CUSTOM_ELEMENT_CAN_ENTER_FIELD(element, nextx, nexty)) + { + if (!DigFieldByCE(nextx, nexty, element)) + return MP_NO_ACTION; + } + if (IS_SB_ELEMENT(element)) { if (element == EL_SOKOBAN_FIELD_FULL) -- 2.34.1