aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-05-25 19:00:34 +0200
committersfan5 <sfan5@live.de>2022-05-29 14:00:19 +0200
commitbccaf5fc2d11c31615d64b9bca91f908d06b7044 (patch)
tree236f20b4bd223858c4657256972c3e2924816e1a
parent0c6a02941320cb089a5965857866ff064ba986b6 (diff)
downloadminetest-bccaf5fc2d11c31615d64b9bca91f908d06b7044.tar.gz
minetest-bccaf5fc2d11c31615d64b9bca91f908d06b7044.tar.bz2
minetest-bccaf5fc2d11c31615d64b9bca91f908d06b7044.zip
Map opaque waving leaves to allfaces drawtype
fixes #9842
-rw-r--r--src/nodedef.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 922554a2c..9c85826c4 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -901,8 +901,15 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
solidness = 0;
visual_solidness = 1;
} else {
- drawtype = NDT_NORMAL;
- solidness = 2;
+ if (waving >= 1) {
+ // waving nodes must make faces so there are no gaps
+ drawtype = NDT_ALLFACES;
+ solidness = 0;
+ visual_solidness = 1;
+ } else {
+ drawtype = NDT_NORMAL;
+ solidness = 2;
+ }
for (TileDef &td : tdef)
td.name += std::string("^[noalpha");
}