diff options
author | paramat <paramat@users.noreply.github.com> | 2017-11-15 23:52:31 +0000 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-06-03 17:32:00 +0200 |
commit | a90c314c80b87abbaa7668a55bc0d1194dd0920f (patch) | |
tree | 0f188f2e8400d643b8b7442da1af5cdea1af8b1a /src/mapgen.cpp | |
parent | 222fab3d20e6f830dcdaa71b7f5845eb2b152108 (diff) | |
download | minetest-a90c314c80b87abbaa7668a55bc0d1194dd0920f.tar.gz minetest-a90c314c80b87abbaa7668a55bc0d1194dd0920f.tar.bz2 minetest-a90c314c80b87abbaa7668a55bc0d1194dd0920f.zip |
Biome dust node: Only place on 'walkable' cubic non-liquid drawtypes
No longer decide placement on 'buildable_to' parameter.
Dust nodes only look acceptable placed on cubic nodes.
Modders may not want to make their plantlike decorations 'buildable_to'.
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r-- | src/mapgen.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 1aa3be302..f4165f5cd 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -809,7 +809,16 @@ void MapgenBasic::dustTopNodes() } content_t c = vm->m_data[vi].getContent(); - if (!ndef->get(c).buildable_to && c != CONTENT_IGNORE && c != biome->c_dust) { + NodeDrawType dtype = ndef->get(c).drawtype; + // Only place on walkable cubic non-liquid nodes + // Dust check needed due to vertical overgeneration + if ((dtype == NDT_NORMAL || + dtype == NDT_ALLFACES_OPTIONAL || + dtype == NDT_GLASSLIKE_FRAMED_OPTIONAL || + dtype == NDT_GLASSLIKE || + dtype == NDT_GLASSLIKE_FRAMED || + dtype == NDT_ALLFACES) && + ndef->get(c).walkable && c != biome->c_dust) { vm->m_area.add_y(em, vi, 1); vm->m_data[vi] = MapNode(biome->c_dust); } |