aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mapgen_v6.cpp9
-rw-r--r--src/mapgen_v6.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp
index 82ed6c4d4..3f3ccba4f 100644
--- a/src/mapgen_v6.cpp
+++ b/src/mapgen_v6.cpp
@@ -42,6 +42,7 @@ FlagDesc flagdesc_mapgen_v6[] = {
{"biomeblend", MGV6_BIOMEBLEND},
{"mudflow", MGV6_MUDFLOW},
{"snowbiomes", MGV6_SNOWBIOMES},
+ {"flat", MGV6_FLAT},
{NULL, 0}
};
@@ -263,7 +264,7 @@ float MapgenV6::baseTerrainLevel(float terrain_base, float terrain_higher,
float MapgenV6::baseTerrainLevelFromNoise(v2s16 p)
{
- if (flags & MG_FLAT)
+ if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
return water_level;
float terrain_base = NoisePerlin2D_PO(&noise_terrain_base->np,
@@ -289,7 +290,7 @@ float MapgenV6::baseTerrainLevelFromMap(v2s16 p)
float MapgenV6::baseTerrainLevelFromMap(int index)
{
- if (flags & MG_FLAT)
+ if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
return water_level;
float terrain_base = noise_terrain_base->result[index];
@@ -386,7 +387,7 @@ bool MapgenV6::getHaveAppleTree(v2s16 p)
float MapgenV6::getMudAmount(int index)
{
- if (flags & MG_FLAT)
+ if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
return MGV6_AVERAGE_MUD_AMOUNT;
/*return ((float)AVERAGE_MUD_AMOUNT + 2.0 * noise2d_perlin(
@@ -603,7 +604,7 @@ void MapgenV6::calculateNoise()
int fx = full_node_min.X;
int fz = full_node_min.Z;
- if (!(flags & MG_FLAT)) {
+ if (!((spflags & MGV6_FLAT) || (flags & MG_FLAT))) {
noise_terrain_base->perlinMap2D_PO(x, 0.5, z, 0.5);
noise_terrain_higher->perlinMap2D_PO(x, 0.5, z, 0.5);
noise_steepness->perlinMap2D_PO(x, 0.5, z, 0.5);
diff --git a/src/mapgen_v6.h b/src/mapgen_v6.h
index 685fdad7e..dec92ab48 100644
--- a/src/mapgen_v6.h
+++ b/src/mapgen_v6.h
@@ -36,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define MGV6_BIOMEBLEND 0x02
#define MGV6_MUDFLOW 0x04
#define MGV6_SNOWBIOMES 0x08
+#define MGV6_FLAT 0x10
extern FlagDesc flagdesc_mapgen_v6[];