X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=c4392072282e37d0f8eec97c5b231a9dd7233ccd;hb=60aac4d0fa635b69e498dcb174f3fe9b2cacc1c9;hp=6a808a57ade57a4f9fa1538e0034b6e84ed68876;hpb=37b49c4250f7db1000f65efe06ab5969f86a7b84;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index 6a808a57..c4392072 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5859,12 +5859,18 @@ static void CopyCustomElementPropertiesToEditor(int element) CAN_EXPLODE_CROSS(element)); /* special case: sub-settings dependent from main setting */ +#if 0 + custom_element.can_explode_by_fire = CAN_EXPLODE_BY_FIRE(element); + custom_element.can_explode_smashed = CAN_EXPLODE_SMASHED(element); + custom_element.can_explode_impact = CAN_EXPLODE_IMPACT(element); +#else if (CAN_EXPLODE_BY_FIRE(element)) custom_element.can_explode_by_fire = TRUE; if (CAN_EXPLODE_SMASHED(element)) custom_element.can_explode_smashed = TRUE; if (CAN_EXPLODE_IMPACT(element)) custom_element.can_explode_impact = TRUE; +#endif /* ---------- element settings: advanced (custom elements) --------------- */ @@ -5946,6 +5952,7 @@ static void CopyCustomElementPropertiesToGame(int element) { int i; int access_type_and_layer; + boolean can_explode; /* mark that this custom element has been modified */ custom_element.modified_settings = TRUE; @@ -6022,6 +6029,17 @@ static void CopyCustomElementPropertiesToGame(int element) custom_element_properties[EP_EXPLODE_RESULT]; /* special case: sub-settings dependent from main setting */ +#if 0 + can_explode = (custom_element_properties[EP_CAN_EXPLODE_1X1] || + custom_element_properties[EP_CAN_EXPLODE_3X3] || + custom_element_properties[EP_CAN_EXPLODE_CROSS]); + custom_element_properties[EP_CAN_EXPLODE_BY_FIRE] = + (can_explode && custom_element.can_explode_by_fire); + custom_element_properties[EP_CAN_EXPLODE_SMASHED] = + (can_explode && custom_element.can_explode_smashed); + custom_element_properties[EP_CAN_EXPLODE_IMPACT] = + (can_explode && custom_element.can_explode_impact); +#else if (custom_element_properties[EP_CAN_EXPLODE_1X1] || custom_element_properties[EP_CAN_EXPLODE_3X3] || custom_element_properties[EP_CAN_EXPLODE_CROSS]) @@ -6033,6 +6051,7 @@ static void CopyCustomElementPropertiesToGame(int element) custom_element_properties[EP_CAN_EXPLODE_IMPACT] = custom_element.can_explode_impact; } +#endif /* ---------- element settings: advanced (custom elements) --------------- */