aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/content_mapblock.cpp4
-rw-r--r--src/nodedef.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/client/content_mapblock.cpp b/src/client/content_mapblock.cpp
index df2748212..90284ecce 100644
--- a/src/client/content_mapblock.cpp
+++ b/src/client/content_mapblock.cpp
@@ -513,10 +513,10 @@ f32 MapblockMeshGenerator::getCornerLevel(int i, int k)
count++;
} else if (content == CONTENT_AIR) {
air_count++;
- if (air_count >= 2)
- return -0.5 * BS + 0.2;
}
}
+ if (air_count >= 2)
+ return -0.5 * BS + 0.2;
if (count > 0)
return sum / count;
return 0;
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index f9d15a9f6..1740b010a 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -788,14 +788,12 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
solidness = 0;
break;
case NDT_LIQUID:
- assert(liquid_type == LIQUID_SOURCE);
if (tsettings.opaque_water)
alpha = 255;
solidness = 1;
is_liquid = true;
break;
case NDT_FLOWINGLIQUID:
- assert(liquid_type == LIQUID_FLOWING);
solidness = 0;
if (tsettings.opaque_water)
alpha = 255;
@@ -1596,7 +1594,7 @@ static void removeDupes(std::vector<content_t> &list)
void NodeDefManager::resolveCrossrefs()
{
for (ContentFeatures &f : m_content_features) {
- if (f.liquid_type != LIQUID_NONE) {
+ if (f.liquid_type != LIQUID_NONE || f.drawtype == NDT_LIQUID || f.drawtype == NDT_FLOWINGLIQUID) {
f.liquid_alternative_flowing_id = getId(f.liquid_alternative_flowing);
f.liquid_alternative_source_id = getId(f.liquid_alternative_source);
continue;