From 62ce600f34661138022d2ab3e67b254d43b5228e Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 16 Jul 2003 21:42:40 +0200 Subject: [PATCH] rnd-20030716-1-src --- src/conftime.h | 2 +- src/editor.c | 2 ++ src/game.c | 21 ++++++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/conftime.h b/src/conftime.h index 63d5a435..392061d4 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-07-09 23:16]" +#define COMPILE_DATE_STRING "[2003-07-16 20:28]" diff --git a/src/editor.c b/src/editor.c index c3cf7a12..d780a053 100644 --- a/src/editor.c +++ b/src/editor.c @@ -959,7 +959,9 @@ static struct ValueTextInfo options_move_stepsize[] = static struct ValueTextInfo options_smash_targets[] = { { EP_CAN_SMASH_PLAYER, "player" }, +#if 0 { EP_CAN_SMASH_ENEMIES, "enemies" }, +#endif { EP_CAN_SMASH_EVERYTHING, "everything" }, { -1, NULL } }; diff --git a/src/game.c b/src/game.c index 150182ac..2a63d3ce 100644 --- a/src/game.c +++ b/src/game.c @@ -1918,7 +1918,9 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_MOVING(x, y) || IS_BLOCKED(x, y)) { element = MovingOrBlocked2Element(x, y); - RemoveMovingField(x, y); + + if (!IS_EXPLOSION_PROOF(element)) + RemoveMovingField(x, y); } #if 1 @@ -2768,6 +2770,13 @@ void Impact(int x, int y) Bang(x, y + 1); return; } +#if 0 + else if (CAN_SMASH_ENEMIES(element) && IS_CLASSIC_ENEMY(smashed)) + { + Bang(x, y + 1); + return; + } +#endif else if (CAN_SMASH_EVERYTHING(element)) { if (IS_CLASSIC_ENEMY(smashed) || @@ -5119,6 +5128,10 @@ static void ChangeElementNowExt(int x, int y, int target_element) if (CAN_BE_CRUMBLED(Feld[x][y])) DrawLevelFieldCrumbledSandNeighbours(x, y); + + TestIfBadThingTouchesHero(x, y); + TestIfPlayerTouchesCustomElement(x, y); + TestIfElementTouchesCustomElement(x, y); } static void ChangeElementNow(int x, int y, int element) @@ -5173,6 +5186,9 @@ static void ChangeElementNow(int x, int y, int element) e = Feld[ex][ey]; + if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey)) + e = MovingOrBlocked2Element(ex, ey); + half_destructible = (IS_FREE(ex, ey) || IS_DIGGABLE(e)); if ((change->power <= CP_NON_DESTRUCTIVE && !IS_FREE(ex, ey)) || @@ -5198,6 +5214,9 @@ static void ChangeElementNow(int x, int y, int element) if (can_change[xx][yy] && (!change->use_random_change || RND(change->random) == 0)) { + if (IS_MOVING(ex, ey) || IS_BLOCKED(ex, ey)) + RemoveMovingField(ex, ey); + ChangeElementNowExt(ex, ey, change->content[xx][yy]); /* for symmetry reasons, stop newly created border elements */ -- 2.34.1