aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mapgen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mapgen.cpp b/src/script/lua_api/l_mapgen.cpp
index 7757ea80c..b179ac407 100644
--- a/src/script/lua_api/l_mapgen.cpp
+++ b/src/script/lua_api/l_mapgen.cpp
@@ -1156,7 +1156,9 @@ int ModApiMapgen::l_register_ore(lua_State *L)
OreStratum *orestratum = (OreStratum *)ore;
lua_getfield(L, index, "np_stratum_thickness");
- read_noiseparams(L, -1, &orestratum->np_stratum_thickness);
+ // If thickness noise missing unset 'use noise' flag
+ if (!read_noiseparams(L, -1, &orestratum->np_stratum_thickness))
+ ore->flags &= ~OREFLAG_USE_NOISE;
lua_pop(L, 1);
break;