Skip to content

Commit

Permalink
Fix horizontal/vertical merging bug of hardware-colored framed glass (#…
Browse files Browse the repository at this point in the history
…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 9bff154
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/content_mapblock.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 9bff154

Please sign in to comment.