summaryrefslogtreecommitdiff
path: root/src/cavegen.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2015-04-06 22:52:08 +0100
committerparamat <mat.gregory@virginmedia.com>2015-04-07 04:43:24 +0100
commit392ac41c993daba284d4840fe93169f802d860b6 (patch)
treec93efe5ce7eb8fa16a1a4bdb0f7850d4bed7f983 /src/cavegen.cpp
parentf81759792e77e681ab9f844c43fa71f2772c03b7 (diff)
downloadminetest-392ac41c993daba284d4840fe93169f802d860b6.tar.gz
minetest-392ac41c993daba284d4840fe93169f802d860b6.tar.bz2
minetest-392ac41c993daba284d4840fe93169f802d860b6.zip
Cavegen: Remove now unnecessary checks for water, lava, ice
Remove large cave checks for air Mgv5/mgv7:Add is_ground_content checks to 3d noise tunnels More large caves Shorten lines
Diffstat (limited to 'src/cavegen.cpp')
-rw-r--r--src/cavegen.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/cavegen.cpp b/src/cavegen.cpp
index 8fb1a7293..1786b252d 100644
--- a/src/cavegen.cpp
+++ b/src/cavegen.cpp
@@ -262,11 +262,8 @@ void CaveV5::carveRoute(v3f vec, float f, bool randomize_xz, bool is_ravine) {
continue;
u32 i = vm->m_area.index(p);
-
- // Don't replace air, water, lava, or ice
content_t c = vm->m_data[i].getContent();
- if (!ndef->get(c).is_ground_content || c == CONTENT_AIR ||
- c == c_water_source || c == c_lava_source || c == c_ice)
+ if (!ndef->get(c).is_ground_content)
continue;
int full_ymin = node_min.Y - MAP_BLOCKSIZE;
@@ -551,9 +548,7 @@ void CaveV6::carveRoute(v3f vec, float f, bool randomize_xz) {
vm->m_data[i] = airnode;
}
} else {
- // Don't replace air or water or lava or ignore
- if (c == CONTENT_IGNORE || c == CONTENT_AIR ||
- c == c_water_source || c == c_lava_source)
+ if (c == CONTENT_IGNORE || c == CONTENT_AIR)
continue;
vm->m_data[i] = airnode;
@@ -800,11 +795,8 @@ void CaveV7::carveRoute(v3f vec, float f, bool randomize_xz, bool is_ravine) {
continue;
u32 i = vm->m_area.index(p);
-
- // Don't replace air, water, lava, or ice
content_t c = vm->m_data[i].getContent();
- if (!ndef->get(c).is_ground_content || c == CONTENT_AIR ||
- c == c_water_source || c == c_lava_source || c == c_ice)
+ if (!ndef->get(c).is_ground_content)
continue;
int full_ymin = node_min.Y - MAP_BLOCKSIZE;