projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e79658a
)
fixed MM wall tiles in dynamic element list in level editor
author
Holger Schemel
<info@artsoft.org>
Thu, 23 Mar 2023 11:53:08 +0000
(12:53 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 23 Mar 2023 11:53:08 +0000
(12:53 +0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 415b54dc9b52bfd68a309eacac0bdd49929963ff..52df4dfacefce6feeb3f311cf2cb39f4ac3f60ec 100644
(file)
--- 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;