X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=4fc9d68fc503bbae10aab70ce277c72a5237243c;hb=2a5c67b00174b07749ca8bef96ba3281e6839dba;hp=a726f9139671e95d179840c3a14ce2ae93ef4dfb;hpb=6ee3c137f499f7a288b95b9455efcafa1aa0e774;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index a726f913..4fc9d68f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3336,7 +3336,6 @@ static void DrawCustomChangedArea() int area_y = ypos / MINI_TILEY; int area_sx = SX + xpos; int area_sy = SY + ypos; - int i = properties_element - EL_CUSTOM_START; if (!IS_CUSTOM_ELEMENT(properties_element)) { @@ -3346,7 +3345,7 @@ static void DrawCustomChangedArea() return; } - ElementContent[0][0][0] = level.custom_element[i].change.successor; + ElementContent[0][0][0] = custom_element_change.successor; DrawElementBorder(area_sx, area_sy, MINI_TILEX, MINI_TILEY); DrawMiniElement(area_x, area_y, ElementContent[0][0][0]); @@ -4756,7 +4755,8 @@ static void HandleDrawingAreas(struct GadgetInfo *gi) { int i = properties_element - EL_CUSTOM_START; - level.custom_element[i].change.successor = new_element; + custom_element_change.successor = new_element; + level.custom_element[i].change = custom_element_change; } else if (id == GADGET_ID_RANDOM_BACKGROUND) random_placement_background_element = new_element;