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.
master
Paramat 2020-09-24 00:10:50 +01:00 committed by GitHub
parent 787561b29a
commit 9bff154cba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -723,7 +723,8 @@ void MapblockMeshGenerator::drawGlasslikeFramedNode()
for (auto &glass_tile : glass_tiles) for (auto &glass_tile : glass_tiles)
glass_tile = tiles[4]; 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 H_merge = !(param2 & 128);
bool V_merge = !(param2 & 64); bool V_merge = !(param2 & 64);
param2 &= 63; param2 &= 63;