1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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
This commit is contained in:
paramat 2015-04-06 22:52:08 +01:00
parent f81759792e
commit 392ac41c99
3 changed files with 39 additions and 39 deletions

View file

@ -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;