mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Mgv6: Add heightmap. Do not make large caves that are entirely above ground
This commit is contained in:
parent
1a175c6982
commit
773aa8c57b
2 changed files with 35 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue