diff options
author | kwolekr <kwolekr@minetest.net> | 2014-11-12 23:58:50 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-11-12 23:58:50 -0500 |
commit | c3ad08708f201fce0118f13022371cac1c2c8b41 (patch) | |
tree | a93ab672e0dcb1e2db2137e4400c0fab1b817ba6 | |
parent | fc9521874ca3dcbc8dfd7237b9b3f2420250b351 (diff) | |
download | minetest-c3ad08708f201fce0118f13022371cac1c2c8b41.tar.gz minetest-c3ad08708f201fce0118f13022371cac1c2c8b41.tar.bz2 minetest-c3ad08708f201fce0118f13022371cac1c2c8b41.zip |
Mapgen v7: Fix uninitialized spflags
Mapgen v5: Fix minor style issue
-rw-r--r-- | src/mapgen_v5.cpp | 10 | ||||
-rw-r--r-- | src/mapgen_v7.cpp | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mapgen_v5.cpp b/src/mapgen_v5.cpp index afe34164c..e98b211af 100644 --- a/src/mapgen_v5.cpp +++ b/src/mapgen_v5.cpp @@ -412,11 +412,11 @@ void MapgenV5::generateBiomes() { for (s16 y = node_max.Y; y >= node_min.Y; y--) { content_t c = vm->m_data[i].getContent(); - if ((c == c_stone || c == c_dirt_with_grass - || c == c_dirt - || c == c_sand - || c == c_lava_source - || c == c_gravel) && have_air) { + bool is_replaceable_content = + c == c_stone || c == c_dirt_with_grass || c == c_dirt || + c == c_sand || c == c_lava_source || c == c_gravel; + + if (is_replaceable_content && have_air) { content_t c_below = vm->m_data[i - em.X].getContent(); if (c_below != CONTENT_AIR) { diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp index 8961d8431..39f0984a1 100644 --- a/src/mapgen_v7.cpp +++ b/src/mapgen_v7.cpp @@ -72,6 +72,7 @@ MapgenV7::MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge) { this->ridge_heightmap = new s16[csize.X * csize.Z]; MapgenV7Params *sp = (MapgenV7Params *)params->sparams; + this->spflags = sp->spflags; //// Terrain noise noise_terrain_base = new Noise(&sp->np_terrain_base, seed, csize.X, csize.Z); |