Skip to content

Commit 159501f

Browse files
numberZerosfan5
authored andcommittedJan 30, 2018
Fix minor issues
1 parent 7f4856d commit 159501f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed
 

Diff for: ‎src/content_mapblock.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ void MapblockMeshGenerator::prepareLiquidNodeDrawing()
389389
c_flowing = nodedef->getId(f->liquid_alternative_flowing);
390390
c_source = nodedef->getId(f->liquid_alternative_source);
391391
top_is_same_liquid = (ntop.getContent() == c_flowing) || (ntop.getContent() == c_source);
392-
draw_bottom = (nbottom.getContent() != c_flowing) && (nbottom.getContent() != c_source);
393-
if (draw_bottom && (nbottom.getContent() != CONTENT_AIR)) {
392+
draw_liquid_bottom = (nbottom.getContent() != c_flowing) && (nbottom.getContent() != c_source);
393+
if (draw_liquid_bottom) {
394394
const ContentFeatures &f2 = nodedef->get(nbottom.getContent());
395395
if (f2.solidness > 1)
396-
draw_bottom = false;
396+
draw_liquid_bottom = false;
397397
}
398398

399399
if (data->m_smooth_lighting)
@@ -605,9 +605,9 @@ void MapblockMeshGenerator::drawLiquidTop()
605605
void MapblockMeshGenerator::drawLiquidBottom()
606606
{
607607
video::S3DVertex vertices[4] = {
608-
video::S3DVertex(-BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 0, 0),
609-
video::S3DVertex( BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 1, 0),
610-
video::S3DVertex( BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 1, 1),
608+
video::S3DVertex(-BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 0, 0),
609+
video::S3DVertex( BS / 2, -BS / 2, -BS / 2, 0, 0, 0, color_liquid_top, 1, 0),
610+
video::S3DVertex( BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 1, 1),
611611
video::S3DVertex(-BS / 2, -BS / 2, BS / 2, 0, 0, 0, color_liquid_top, 0, 1),
612612
};
613613

@@ -628,7 +628,7 @@ void MapblockMeshGenerator::drawLiquidNode()
628628
drawLiquidSides();
629629
if (!top_is_same_liquid)
630630
drawLiquidTop();
631-
if (draw_bottom)
631+
if (draw_liquid_bottom)
632632
drawLiquidBottom();
633633
}
634634

Diff for: ‎src/content_mapblock.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class MapblockMeshGenerator
9292

9393
// liquid-specific
9494
bool top_is_same_liquid;
95-
bool draw_bottom;
95+
bool draw_liquid_bottom;
9696
TileSpec tile_liquid;
9797
TileSpec tile_liquid_top;
9898
content_t c_flowing;

0 commit comments

Comments
 (0)