Skip to content
Permalink
Browse files

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.
  • Loading branch information
paramat committed Sep 23, 2020
1 parent 787561b commit 9bff154cba14686f5a3b56f4cba405824b88c402
Showing with 2 additions and 1 deletion.
  1. +2 −1 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;

0 comments on commit 9bff154

Please sign in to comment.
You can’t perform that action at this time.