summaryrefslogtreecommitdiff
path: root/src/cavegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cavegen.cpp')
-rw-r--r--src/cavegen.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cavegen.cpp b/src/cavegen.cpp
index fc9526b4f..0a950ecf4 100644
--- a/src/cavegen.cpp
+++ b/src/cavegen.cpp
@@ -515,7 +515,7 @@ void CavesRandomWalk::carveRoute(v3f vec, float f, bool randomize_xz)
v3s16 p(cp.X + x0, cp.Y + y0, cp.Z + z0);
p += of;
- if (vm->m_area.contains(p) == false)
+ if (!vm->m_area.contains(p))
continue;
u32 i = vm->m_area.index(p);
@@ -819,7 +819,7 @@ void CavesV6::carveRoute(v3f vec, float f, bool randomize_xz,
v3s16 p(cp.X + x0, cp.Y + y0, cp.Z + z0);
p += of;
- if (vm->m_area.contains(p) == false)
+ if (!vm->m_area.contains(p))
continue;
u32 i = vm->m_area.index(p);
@@ -858,7 +858,8 @@ inline s16 CavesV6::getSurfaceFromHeightmap(v3s16 p)
p.X >= node_min.X && p.X <= node_max.X) {
u32 index = (p.Z - node_min.Z) * ystride + (p.X - node_min.X);
return heightmap[index];
- } else {
- return water_level;
}
+
+ return water_level;
+
}