From: Holger Schemel Date: Thu, 6 May 2004 07:19:37 +0000 (+0200) Subject: rnd-20040506-1-src X-Git-Tag: 3.1.0^2~7 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=19fb8a25ce1f1aac85a8622c6fcca8edb328796d;p=rocksndiamonds.git rnd-20040506-1-src * fixed bug with exploding dynabomb under player due to other explosion --- diff --git a/ChangeLog b/ChangeLog index 14a869f3..f01f8f63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2004-05-05 * fixed bug that caused two activated toolbox buttons in level editor + * fixed bug with exploding dynabomb under player due to other explosion 2004-05-02 * fixed bug with creating walkable custom element under player (again) diff --git a/src/conftime.h b/src/conftime.h index ff374765..c351f23f 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-05-05 22:30]" +#define COMPILE_DATE_STRING "[2004-05-06 01:36]" diff --git a/src/game.c b/src/game.c index f0f4dbf7..9b0a14b9 100644 --- a/src/game.c +++ b/src/game.c @@ -3059,10 +3059,17 @@ void Explode(int ex, int ey, int phase, int mode) continue; #else /* indestructible elements can only explode in center (but not flames) */ +#if 1 + if ((IS_EXPLOSION_PROOF(element) && (x != ex || y != ey || + mode == EX_TYPE_BORDER)) || + element == EL_FLAMES) + continue; +#else if ((IS_EXPLOSION_PROOF(element) && (x != ex || y != ey)) || element == EL_FLAMES) continue; #endif +#endif #else if ((IS_INDESTRUCTIBLE(element) && @@ -3075,7 +3082,7 @@ void Explode(int ex, int ey, int phase, int mode) #if 1 if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y)) && (game.engine_version < VERSION_IDENT(3,1,0,0) || - (x == ex && y == ey))) + (x == ex && y == ey && mode != EX_TYPE_BORDER))) #else if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y))) #endif @@ -3090,6 +3097,12 @@ void Explode(int ex, int ey, int phase, int mode) Feld[x][y] = (Store[x][y] ? Store[x][y] : EL_EMPTY); Store[x][y] = 0; #endif + +#if 0 + printf("::: %d,%d: %d %s [%d, %d]\n", x, y, Feld[x][y], + element_info[Feld[x][y]].token_name, + Store[x][y], Store2[x][y]); +#endif } continue; @@ -3101,9 +3114,15 @@ void Explode(int ex, int ey, int phase, int mode) Back[x][y] = element; #else #if 1 +#if 1 + if (IS_WALKABLE(element) && IS_INDESTRUCTIBLE(element) && + (x != ex || y != ey || mode == EX_TYPE_BORDER)) + Back[x][y] = element; +#else if (IS_WALKABLE(element) && IS_INDESTRUCTIBLE(element) && (x != ex || y != ey)) Back[x][y] = element; +#endif #else if (IS_WALKABLE(element) && IS_INDESTRUCTIBLE(element)) Back[x][y] = element; @@ -3192,10 +3211,15 @@ void Explode(int ex, int ey, int phase, int mode) else Store[x][y] = EL_EMPTY; - if (x != ex || y != ey || - center_element == EL_AMOEBA_TO_DIAMOND || mode == EX_TYPE_BORDER) + if (x != ex || y != ey || mode == EX_TYPE_BORDER || + center_element == EL_AMOEBA_TO_DIAMOND) Store2[x][y] = element; +#if 0 + printf("::: %d,%d: %d %s\n", x, y, Store2[x][y], + element_info[Store2[x][y]].token_name); +#endif + #if 0 if (AmoebaNr[x][y] && (element == EL_AMOEBA_FULL || @@ -3242,6 +3266,11 @@ void Explode(int ex, int ey, int phase, int mode) game.yamyam_content_nr = (game.yamyam_content_nr + 1) % level.num_yamyam_contents; +#if 0 + printf("::: %d,%d: %d %s [%d]\n", ex + 1, ey, Feld[ex + 1][ey], + element_info[Feld[ex + 1][ey]].token_name, Store2[ex + 1][ey]); +#endif + return; } @@ -3295,6 +3324,11 @@ void Explode(int ex, int ey, int phase, int mode) border_element = StorePlayer[x][y]; #endif +#if 0 + printf("::: %d,%d: %d %s [%d]\n", x, y, border_element, + element_info[border_element].token_name, Store2[x][y]); +#endif + #if 0 printf("::: phase == %d\n", phase); #endif @@ -3325,6 +3359,11 @@ void Explode(int ex, int ey, int phase, int mode) } else if (CAN_EXPLODE_BY_EXPLOSION(border_element)) { +#if 0 + printf("::: %d,%d: %d %s\n", x, y, border_element, + element_info[border_element].token_name); +#endif + Feld[x][y] = Store2[x][y]; Store2[x][y] = 0; Bang(x, y);