From: Holger Schemel Date: Fri, 2 Apr 2004 19:34:03 +0000 (+0200) Subject: rnd-20040402-3-src X-Git-Tag: 3.1.0^2~28 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f7342eeb26d5d7c1157b9b0f4c3ba3b961d02870;p=rocksndiamonds.git rnd-20040402-3-src --- diff --git a/src/conftime.h b/src/conftime.h index 4e8894bf..bbe1253a 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-04-02 01:42]" +#define COMPILE_DATE_STRING "[2004-04-02 08:58]" diff --git a/src/game.c b/src/game.c index adc212db..a19a1a86 100644 --- a/src/game.c +++ b/src/game.c @@ -6080,6 +6080,26 @@ void ContinueMoving(int x, int y) (newy == lev_fieldy - 1 || !IS_FREE(x, newy + 1))) Impact(x, newy); +#if 1 + if (pushed_by_player) + { + static int trigger_sides[4] = + { + CH_SIDE_RIGHT, /* moving left */ + CH_SIDE_LEFT, /* moving right */ + CH_SIDE_BOTTOM, /* moving up */ + CH_SIDE_TOP, /* moving down */ + }; + int dig_side = trigger_sides[MV_DIR_BIT(direction)]; + struct PlayerInfo *player = PLAYERINFO(x, y); + + CheckElementChangeByPlayer(newx, newy, element, CE_PUSHED_BY_PLAYER, + player->index_bit, dig_side); + CheckTriggeredElementChangeByPlayer(newx,newy,element,CE_OTHER_GETS_PUSHED, + player->index_bit, dig_side); + } +#endif + #if 1 TestIfElementTouchesCustomElement(x, y); /* empty or new element */ #endif @@ -10892,6 +10912,10 @@ int DigField(struct PlayerInfo *player, else player->push_delay_value = -1; /* get new value later */ +#if 1 + /* check for element change _after_ element has been pushed! */ +#else + #if 1 /* !!! TEST ONLY !!! */ CheckElementChangeByPlayer(x, y, element, CE_PUSHED_BY_PLAYER, @@ -10903,6 +10927,7 @@ int DigField(struct PlayerInfo *player, player->index_bit, dig_side); CheckElementChangeByPlayer(x, y, element, CE_PUSHED_BY_PLAYER, player->index_bit, dig_side); +#endif #endif break;