From: Holger Schemel Date: Thu, 23 Mar 2023 11:53:08 +0000 (+0100) Subject: fixed MM wall tiles in dynamic element list in level editor X-Git-Tag: 4.3.5.3~23 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=016bfbfd8fcefef7fac0d6861d209b7ed25b4fdb;p=rocksndiamonds.git fixed MM wall tiles in dynamic element list in level editor --- diff --git a/src/editor.c b/src/editor.c index 415b54dc..52df4dfa 100644 --- a/src/editor.c +++ b/src/editor.c @@ -5743,9 +5743,18 @@ static void InitDynamicEditorElementList(int **elements, int *num_elements) // find all elements used in current level for (y = 0; y < lev_fieldy; y++) + { for (x = 0; x < lev_fieldx; x++) - if (Tile[x][y] < NUM_FILE_ELEMENTS) // should always be true + { + if (Tile[x][y] >= NUM_FILE_ELEMENTS) // should never happen + continue; + + if (IS_MM_WALL(Tile[x][y])) + element_found[map_mm_wall_element(Tile[x][y])] = TRUE; + else element_found[Tile[x][y]] = TRUE; + } + } *num_elements = 0;