summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2020-09-24 00:10:50 +0100
committerGitHub <noreply@github.com>2020-09-24 00:10:50 +0100
commit9bff154cba14686f5a3b56f4cba405824b88c402 (patch)
tree6802ab2e9b2394d94bc5dfcea2aba76fcbe0a9af
parent787561b29afdbc78769f68c2f5c4f2cff1b32340 (diff)
downloadminetest-9bff154cba14686f5a3b56f4cba405824b88c402.tar.gz
minetest-9bff154cba14686f5a3b56f4cba405824b88c402.tar.bz2
minetest-9bff154cba14686f5a3b56f4cba405824b88c402.zip
Fix horizontal/vertical merging bug of hardware-colored framed glass (#10417)
Previously, the param2-controlled horizontal/vertical merge feature (which was undocumented and forgotten) was always active, causing uses of param2 other than "glasslikeliquidlevel" to affect H/V merging. Only respect H/V merge bits when paramtype2 = "glasslikeliquidlevel". H/V merge bits and liquid level bits are designed to be used simultaneously.
-rw-r--r--src/client/content_mapblock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp
index 65a85709b..df2748212 100644
--- a/src/client/content_mapblock.cpp
+++ b/src/client/content_mapblock.cpp
@@ -723,7 +723,8 @@ void MapblockMeshGenerator::drawGlasslikeFramedNode()
for (auto &glass_tile : glass_tiles)
glass_tile = tiles[4];
- u8 param2 = n.getParam2();
+ // Only respect H/V merge bits when paramtype2 = "glasslikeliquidlevel" (liquid tank)
+ u8 param2 = (f->param_type_2 == CPT2_GLASSLIKE_LIQUID_LEVEL) ? n.getParam2() : 0;
bool H_merge = !(param2 & 128);
bool V_merge = !(param2 & 64);
param2 &= 63;