diff options
author | paramat <paramat@users.noreply.github.com> | 2017-11-15 23:52:31 +0000 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-11-17 19:27:06 +0000 |
commit | ec93893c7f34bcab35b1c356497d8def47d1bf1c (patch) | |
tree | 744b4a8f397b90737b8f81fdba25886b39a719b8 /src/mapgen | |
parent | 05d93c7fa1be9245dd5211b7dc1bdf0961b39eea (diff) | |
download | minetest-ec93893c7f34bcab35b1c356497d8def47d1bf1c.tar.gz minetest-ec93893c7f34bcab35b1c356497d8def47d1bf1c.tar.bz2 minetest-ec93893c7f34bcab35b1c356497d8def47d1bf1c.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')
-rw-r--r-- | src/mapgen/mapgen.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mapgen/mapgen.cpp b/src/mapgen/mapgen.cpp index f73e16dd0..a8b987325 100644 --- a/src/mapgen/mapgen.cpp +++ b/src/mapgen/mapgen.cpp @@ -831,7 +831,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); } |