Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
numberZero authored and sfan5 committed Jan 30, 2018
1 parent 7f4856d commit 159501f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions src/content_mapblock.cpp
Expand Up @@ -389,11 +389,11 @@ void MapblockMeshGenerator::prepareLiquidNodeDrawing()
c_flowing = nodedef->getId(f->liquid_alternative_flowing);
c_source = nodedef->getId(f->liquid_alternative_source);
top_is_same_liquid = (ntop.getContent() == c_flowing) || (ntop.getContent() == c_source);
draw_bottom = (nbottom.getContent() != c_flowing) && (nbottom.getContent() != c_source);
if (draw_bottom && (nbottom.getContent() != CONTENT_AIR)) {
draw_liquid_bottom = (nbottom.getContent() != c_flowing) && (nbottom.getContent() != c_source);
if (draw_liquid_bottom) {
const ContentFeatures &f2 = nodedef->get(nbottom.getContent());
if (f2.solidness > 1)
draw_bottom = false;
draw_liquid_bottom = false;
}

if (data->m_smooth_lighting)
Expand Down Expand Up @@ -605,9 +605,9 @@ void MapblockMeshGenerator::drawLiquidTop()
void MapblockMeshGenerator::drawLiquidBottom()
{
video::S3DVertex vertices[4] = {
video::S3DVertex(-BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 0, 0),
video::S3DVertex( BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 1, 0),
video::S3DVertex( BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 1, 1),
video::S3DVertex(-BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 0, 0),
video::S3DVertex( BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 1, 0),
video::S3DVertex( BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 1, 1),
video::S3DVertex(-BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 0, 1),
};

Expand All @@ -628,7 +628,7 @@ void MapblockMeshGenerator::drawLiquidNode()
drawLiquidSides();
if (!top_is_same_liquid)
drawLiquidTop();
if (draw_bottom)
if (draw_liquid_bottom)
drawLiquidBottom();
}

Expand Down
2 changes: 1 addition & 1 deletion src/content_mapblock.h
Expand Up @@ -92,7 +92,7 @@ class MapblockMeshGenerator

// liquid-specific
bool top_is_same_liquid;
bool draw_bottom;
bool draw_liquid_bottom;
TileSpec tile_liquid;
TileSpec tile_liquid_top;
content_t c_flowing;
Expand Down

0 comments on commit 159501f

Please sign in to comment.