summaryrefslogtreecommitdiff
path: root/src/content_mapblock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_mapblock.cpp')
-rw-r--r--src/content_mapblock.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index d0cb50db3..d18aff879 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -760,8 +760,11 @@ void MapblockMeshGenerator::drawGlasslikeFramedNode()
drawAutoLightedCuboid(glass_faces[face]);
}
- if (param2 > 0 && f->special_tiles[0].texture) {
- // Interior volume level is in range 0 .. 63,
+ // Optionally render internal liquid level defined by param2
+ // Liquid is textured with 1 tile defined in nodedef 'special_tiles'
+ if (param2 > 0 && f->param_type_2 == CPT2_GLASSLIKE_LIQUID_LEVEL &&
+ f->special_tiles[0].texture) {
+ // Internal liquid level has param2 range 0 .. 63,
// convert it to -0.5 .. 0.5
float vlev = (param2 / 63.0) * 2.0 - 1.0;
tile = getSpecialTile(*f, n, 0);