]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Map opaque waving leaves to allfaces drawtype
authorsfan5 <sfan5@live.de>
Wed, 25 May 2022 17:00:34 +0000 (19:00 +0200)
committersfan5 <sfan5@live.de>
Sun, 29 May 2022 12:00:19 +0000 (14:00 +0200)
fixes #9842

src/nodedef.cpp

index 922554a2c00251f8132a20f48b020c5aa701b85f..9c85826c440412d57492618877ef574001390c1b 100644 (file)
@@ -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");
                }