X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=a7bb5979831043fc3de891b4317283c2601ece35;hb=4d331e6a8db3d4b6f1006a70a0fad6f02323c9b9;hp=f8004d0bd7ef5397cc1c09ae50130180a6daa06e;hpb=0ff3f484ffbb8e3404e1dc4536a292335369f2d2;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index f8004d0b..a7bb5979 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 @@ -2089,6 +2089,16 @@ void InitElementPropertiesStatic() static int ep_protected[] = { + EL_EM_GATE_1, + EL_EM_GATE_2, + EL_EM_GATE_3, + EL_EM_GATE_4, + EL_EM_GATE_1_GRAY, + EL_EM_GATE_2_GRAY, + EL_EM_GATE_3_GRAY, + EL_EM_GATE_4_GRAY, + EL_SWITCHGATE_OPEN, + EL_TIMEGATE_OPEN, -1 }; @@ -3082,6 +3092,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 +3104,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 +3155,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))); @@ -3235,6 +3252,20 @@ void InitElementPropertiesEngine(int engine_version) if (element_info[element].push_delay_random == -1) element_info[element].push_delay_random = game.default_push_delay_random; } + + /* set some other uninitialized values of custom elements in older levels */ + if (engine_version < VERSION_IDENT(3,0,9,0)) + { + for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++) + { + int element = EL_CUSTOM_START + i; + + element_info[element].access_direction = MV_ALL_DIRECTIONS; + + element_info[element].explosion_delay = 18; + element_info[element].ignition_delay = 8; + } + } #endif /* this is needed because some graphics depend on element properties */