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
parent
787561b29a
commit
9bff154cba
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue