summaryrefslogtreecommitdiff
path: root/src/mapgen_v6.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-03-01 01:30:47 +0000
committerparamat <mat.gregory@virginmedia.com>2015-03-02 02:13:43 +0000
commit773aa8c57b70dd85273cb61286f8be577b4ca3aa (patch)
tree96b8d9f741c819b95c85ee3d1f2cf62f81ce82aa /src/mapgen_v6.cpp
parent1a175c6982375c996d747ad5569d5d829fa2dde4 (diff)
downloadminetest-773aa8c57b70dd85273cb61286f8be577b4ca3aa.tar.gz
minetest-773aa8c57b70dd85273cb61286f8be577b4ca3aa.tar.bz2
minetest-773aa8c57b70dd85273cb61286f8be577b4ca3aa.zip
Mgv6: Add heightmap. Do not make large caves that are entirely above ground
Diffstat (limited to 'src/mapgen_v6.cpp')
-rw-r--r--src/mapgen_v6.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp
index 95cdbd279..4783e4285 100644
--- a/src/mapgen_v6.cpp
+++ b/src/mapgen_v6.cpp
@@ -55,6 +55,8 @@ MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
this->m_emerge = emerge;
this->ystride = csize.X; //////fix this
+ this->heightmap = new s16[csize.X * csize.Z];
+
MapgenV6Params *sp = (MapgenV6Params *)params->sparams;
this->spflags = sp->spflags;
this->freq_desert = sp->freq_desert;
@@ -498,6 +500,9 @@ void MapgenV6::makeChunk(BlockMakeData *data)
}
+ // Create heightmap after mudflow
+ updateHeightmap(node_min, node_max);
+
// Add dungeons
if ((flags & MG_DUNGEONS) && (stone_surface_max_y >= node_min.Y)) {
DungeonParams dp;