1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-23 16:08:51 -05:00

Mapgen v7: Fix uninitialized spflags

Mapgen v5: Fix minor style issue
This commit is contained in:
kwolekr 2014-11-12 23:58:50 -05:00
parent fc9521874c
commit c3ad08708f
2 changed files with 6 additions and 5 deletions

View File

@ -412,11 +412,11 @@ void MapgenV5::generateBiomes() {
for (s16 y = node_max.Y; y >= node_min.Y; y--) { for (s16 y = node_max.Y; y >= node_min.Y; y--) {
content_t c = vm->m_data[i].getContent(); content_t c = vm->m_data[i].getContent();
if ((c == c_stone || c == c_dirt_with_grass bool is_replaceable_content =
|| c == c_dirt c == c_stone || c == c_dirt_with_grass || c == c_dirt ||
|| c == c_sand c == c_sand || c == c_lava_source || c == c_gravel;
|| c == c_lava_source
|| c == c_gravel) && have_air) { if (is_replaceable_content && have_air) {
content_t c_below = vm->m_data[i - em.X].getContent(); content_t c_below = vm->m_data[i - em.X].getContent();
if (c_below != CONTENT_AIR) { if (c_below != CONTENT_AIR) {

View File

@ -72,6 +72,7 @@ MapgenV7::MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge) {
this->ridge_heightmap = new s16[csize.X * csize.Z]; this->ridge_heightmap = new s16[csize.X * csize.Z];
MapgenV7Params *sp = (MapgenV7Params *)params->sparams; MapgenV7Params *sp = (MapgenV7Params *)params->sparams;
this->spflags = sp->spflags;
//// Terrain noise //// Terrain noise
noise_terrain_base = new Noise(&sp->np_terrain_base, seed, csize.X, csize.Z); noise_terrain_base = new Noise(&sp->np_terrain_base, seed, csize.X, csize.Z);