aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapgen/dungeongen.cpp')
-rw-r--r--src/mapgen/dungeongen.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/mapgen/dungeongen.cpp b/src/mapgen/dungeongen.cpp
index 1d439abeb..17ad31f31 100644
--- a/src/mapgen/dungeongen.cpp
+++ b/src/mapgen/dungeongen.cpp
@@ -93,29 +93,31 @@ void DungeonGen::generate(MMVManip *vm, u32 bseed, v3s16 nmin, v3s16 nmax)
// Dungeon generator doesn't modify places which have this set
vm->clearFlag(VMANIP_FLAG_DUNGEON_INSIDE | VMANIP_FLAG_DUNGEON_PRESERVE);
- if (dp.only_in_ground) {
- // Set all air and liquid drawtypes to be untouchable to make dungeons generate
- // in ground only.
- // Set 'ignore' to be untouchable to prevent generation in ungenerated neighbor
- // mapchunks, to avoid dungeon rooms generating outside ground.
- // Like randomwalk caves, preserve nodes that have 'is_ground_content = false',
- // to avoid dungeons that generate out beyond the edge of a mapchunk destroying
- // nodes added by mods in 'register_on_generated()'.
- for (s16 z = nmin.Z; z <= nmax.Z; z++) {
- for (s16 y = nmin.Y; y <= nmax.Y; y++) {
- u32 i = vm->m_area.index(nmin.X, y, z);
- for (s16 x = nmin.X; x <= nmax.X; x++) {
- content_t c = vm->m_data[i].getContent();
- NodeDrawType dtype = ndef->get(c).drawtype;
- if (dtype == NDT_AIRLIKE || dtype == NDT_LIQUID ||
- c == CONTENT_IGNORE || !ndef->get(c).is_ground_content)
- vm->m_flags[i] |= VMANIP_FLAG_DUNGEON_PRESERVE;
- i++;
- }
+// if (dp.only_in_ground) {
+
+ // Set all air and liquid drawtypes to be untouchable to make dungeons generate
+ // in ground only.
+ // Set 'ignore' to be untouchable to prevent generation in ungenerated neighbor
+ // mapchunks, to avoid dungeon rooms generating outside ground.
+ // Like randomwalk caves, preserve nodes that have 'is_ground_content = false',
+ // to avoid dungeons that generate out beyond the edge of a mapchunk destroying
+ // nodes added by mods in 'register_on_generated()'.
+ for (s16 z = nmin.Z; z <= nmax.Z; z++) {
+ for (s16 y = nmin.Y; y <= nmax.Y; y++) {
+ u32 i = vm->m_area.index(nmin.X, y, z);
+ for (s16 x = nmin.X; x <= nmax.X; x++) {
+ content_t c = vm->m_data[i].getContent();
+ NodeDrawType dtype = ndef->get(c).drawtype;
+ if (dtype == NDT_AIRLIKE || dtype == NDT_LIQUID ||
+ c == CONTENT_IGNORE || !ndef->get(c).is_ground_content)
+ vm->m_flags[i] |= VMANIP_FLAG_DUNGEON_PRESERVE;
+ i++;
}
}
}
+// }
+
// Add them
for (u32 i = 0; i < dp.num_dungeons; i++)
makeDungeon(v3s16(1, 1, 1) * MAP_BLOCKSIZE);