Mapgen v5: Fix minor style issue
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) {
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);