aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-01-21 11:42:13 +0000
committerkwolekr <kwolekr@minetest.net>2015-01-23 21:24:47 -0500
commitaafbbcd537abf5a31bba665d4255917c813f8dd3 (patch)
treed1f0595af02dd7b3b1357296f0e83c3aadf1f08e
parenta9f81b729b1cc90db5574fdb97542901e695bf69 (diff)
downloadminetest-aafbbcd537abf5a31bba665d4255917c813f8dd3.tar.gz
minetest-aafbbcd537abf5a31bba665d4255917c813f8dd3.tar.bz2
minetest-aafbbcd537abf5a31bba665d4255917c813f8dd3.zip
Mgv5: Skip calculation of filler, heat and humidity perlinmaps in underground mapchunks
-rw-r--r--src/mapgen_v5.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mapgen_v5.cpp b/src/mapgen_v5.cpp
index e288e80f2..f7efc4e18 100644
--- a/src/mapgen_v5.cpp
+++ b/src/mapgen_v5.cpp
@@ -302,24 +302,25 @@ void MapgenV5::calculateNoise()
int y = node_min.Y - 1;
int z = node_min.Z;
- noise_filler_depth->perlinMap2D(x, z);
noise_factor->perlinMap2D(x, z);
noise_height->perlinMap2D(x, z);
+ noise_ground->perlinMap3D(x, y, z);
if (flags & MG_CAVES) {
noise_cave1->perlinMap3D(x, y, z);
noise_cave2->perlinMap3D(x, y, z);
}
- noise_ground->perlinMap3D(x, y, z);
-
if (spflags & MGV5_BLOBS) {
noise_crumble->perlinMap3D(x, y, z);
noise_wetness->perlinMap3D(x, y, z);
}
- noise_heat->perlinMap2D(x, z);
- noise_humidity->perlinMap2D(x, z);
+ if (node_max.Y >= water_level) {
+ noise_filler_depth->perlinMap2D(x, z);
+ noise_heat->perlinMap2D(x, z);
+ noise_humidity->perlinMap2D(x, z);
+ }
//printf("calculateNoise: %dus\n", t.stop());
}
@@ -531,12 +532,12 @@ void MapgenV5::generateBlobs()
void MapgenV5::dustTopNodes()
{
+ if (node_max.Y < water_level)
+ return;
+
v3s16 em = vm->m_area.getExtent();
u32 index = 0;
- if (water_level > node_max.Y)
- return;
-
for (s16 z = node_min.Z; z <= node_max.Z; z++)
for (s16 x = node_min.X; x <= node_max.X; x++, index++) {
Biome *biome = (Biome *)bmgr->get(biomemap[index]);