From: Holger Schemel Date: Tue, 17 Feb 2004 00:37:53 +0000 (+0100) Subject: rnd-20040217-1-src X-Git-Tag: 3.1.0^2~73 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3196b972e1e5f3a7d5729b669b2df43a8f4d1938;p=rocksndiamonds.git rnd-20040217-1-src --- diff --git a/src/conftime.h b/src/conftime.h index a984d548..9ca72447 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-02-07 12:58]" +#define COMPILE_DATE_STRING "[2004-02-17 01:20]" diff --git a/src/game.c b/src/game.c index d304e76e..ffd0cd61 100644 --- a/src/game.c +++ b/src/game.c @@ -2722,7 +2722,7 @@ void Explode(int ex, int ey, int phase, int mode) if (phase == last_phase) printf("::: IS_PLAYER\n"); } - else if (CAN_EXPLODE_BY_FIRE(border_element)) + else if (CAN_EXPLODE_BY_EXPLOSION(border_element)) { Feld[x][y] = Store2[x][y]; Store2[x][y] = 0; @@ -2730,18 +2730,25 @@ void Explode(int ex, int ey, int phase, int mode) border_explosion = TRUE; if (phase == last_phase) - printf("::: CAN_EXPLODE_BY_FIRE\n"); + printf("::: CAN_EXPLODE_BY_EXPLOSION\n"); } else if (border_element == EL_AMOEBA_TO_DIAMOND) { AmoebeUmwandeln(x, y); + Store2[x][y] = 0; border_explosion = TRUE; if (phase == last_phase) - printf("::: EL_AMOEBA_TO_DIAMOND\n"); + printf("::: EL_AMOEBA_TO_DIAMOND [%d, %d] [%d]\n", + element_info[border_element].explosion_delay, + element_info[border_element].ignition_delay, + phase); } -#if 0 +#if 1 + /* if an element just explodes due to another explosion (chain-reaction), + do not immediately end the new explosion when it was the last frame of + the explosion (as it would be done in the following "if"-statement!) */ if (border_explosion && phase == last_phase) return; #endif @@ -2766,7 +2773,7 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_PLAYER(x, y)) KillHeroUnlessExplosionProtected(x, y); - else if (CAN_EXPLODE_BY_FIRE(element)) + else if (CAN_EXPLODE_BY_EXPLOSION(element)) { Feld[x][y] = Store2[x][y]; Store2[x][y] = 0; @@ -4759,7 +4766,7 @@ void StartMoving(int x, int y) { int flamed = MovingOrBlocked2Element(xx, yy); - if (IS_CLASSIC_ENEMY(flamed) || CAN_EXPLODE_BY_FIRE(flamed)) + if (IS_CLASSIC_ENEMY(flamed) || CAN_EXPLODE_BY_DRAGONFIRE(flamed)) Bang(xx, yy); else RemoveMovingField(xx, yy); diff --git a/src/init.c b/src/init.c index f8004d0b..cfb271b1 100644 --- a/src/init.c +++ b/src/init.c @@ -1945,7 +1945,7 @@ void InitElementPropertiesStatic() EL_SP_DISK_YELLOW, EL_SP_SNIKSNAK, EL_SP_ELECTRON, -#if 1 +#if 0 EL_BLACK_ORB, #endif -1 @@ -3082,6 +3082,10 @@ void InitElementPropertiesEngine(int engine_version) !IS_DIGGABLE(i) && !IS_COLLECTIBLE(i))); + /* ---------- PROTECTED ------------------------------------------------ */ + if (IS_ACCESSIBLE_INSIDE(i)) + SET_PROPERTY(i, EP_PROTECTED, TRUE); + /* ---------- DRAGONFIRE_PROOF ----------------------------------------- */ if (IS_HISTORIC_SOLID(i) || i == EL_EXPLOSION) @@ -3090,10 +3094,6 @@ void InitElementPropertiesEngine(int engine_version) SET_PROPERTY(i, EP_DRAGONFIRE_PROOF, (IS_CUSTOM_ELEMENT(i) && IS_INDESTRUCTIBLE(i))); - /* ---------- PROTECTED ------------------------------------------------ */ - if (IS_ACCESSIBLE_INSIDE(i)) - SET_PROPERTY(i, EP_PROTECTED, TRUE); - /* ---------- EXPLOSION_PROOF ------------------------------------------ */ if (i == EL_FLAMES) SET_PROPERTY(i, EP_EXPLOSION_PROOF, TRUE); @@ -3145,6 +3145,13 @@ void InitElementPropertiesEngine(int engine_version) !CAN_EXPLODE_1X1(i) && !CAN_EXPLODE_DYNA(i))); + /* ---------- CAN_EXPLODE_BY_DRAGONFIRE -------------------------------- */ + SET_PROPERTY(i, EP_CAN_EXPLODE_BY_DRAGONFIRE, CAN_EXPLODE_BY_FIRE(i)); + + /* ---------- CAN_EXPLODE_BY_EXPLOSION --------------------------------- */ + SET_PROPERTY(i, EP_CAN_EXPLODE_BY_EXPLOSION, (CAN_EXPLODE_BY_FIRE(i) || + i == EL_BLACK_ORB)); + /* ---------- SP_PORT -------------------------------------------------- */ SET_PROPERTY(i, EP_SP_PORT, (IS_SP_ELEMENT(i) && IS_PASSABLE_INSIDE(i))); diff --git a/src/main.h b/src/main.h index 486f6f2a..c94ff57f 100644 --- a/src/main.h +++ b/src/main.h @@ -137,13 +137,15 @@ #define EP_CAN_EXPLODE 70 #define EP_CAN_EXPLODE_3X3 71 #define EP_SP_PORT 72 +#define EP_CAN_EXPLODE_BY_DRAGONFIRE 73 +#define EP_CAN_EXPLODE_BY_EXPLOSION 74 /* values for internal purpose only (level editor) */ -#define EP_EXPLODE_RESULT 73 -#define EP_WALK_TO_OBJECT 74 -#define EP_DEADLY 75 +#define EP_EXPLODE_RESULT 75 +#define EP_WALK_TO_OBJECT 76 +#define EP_DEADLY 77 -#define NUM_ELEMENT_PROPERTIES 76 +#define NUM_ELEMENT_PROPERTIES 78 #define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32) #define EP_BITFIELD_BASE 0 @@ -357,6 +359,10 @@ #define CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE) #define CAN_EXPLODE_3X3(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_3X3) #define IS_SP_PORT(e) HAS_PROPERTY(e, EP_SP_PORT) +#define CAN_EXPLODE_BY_DRAGONFIRE(e) \ + HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_DRAGONFIRE) +#define CAN_EXPLODE_BY_EXPLOSION(e) \ + HAS_PROPERTY(e, EP_CAN_EXPLODE_BY_EXPLOSION) /* special macros used in game engine */ #define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \