mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Mapgen: Remove unused 'flat' and 'trees' flags from mg_flags
When the 'flat' and 'trees' flags were moved into mgv6_spflags they were left in mg_flags in an attempt to support old mgv6 worlds. However their appearence in mg_flags causes confusion, also, later, old-world support was found to be broken for mgv6 worlds with 'notrees'. This commit cleans up the mess and comes a month after a thread warning of the change, and explaining the required action, was posted in the news subforum. Only old mgv6 worlds with 'flat' or 'notrees' are affected, a small minority of worlds, the required action being correctly setting these flags in mgv6_spflags. Disable a section of the 'map settings manager' unit test which is to be changed as it is causing problems for pull requests.
This commit is contained in:
@@ -268,7 +268,7 @@ float MapgenV6::baseTerrainLevel(float terrain_base, float terrain_higher,
|
||||
|
||||
float MapgenV6::baseTerrainLevelFromNoise(v2s16 p)
|
||||
{
|
||||
if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
|
||||
if (spflags & MGV6_FLAT)
|
||||
return water_level;
|
||||
|
||||
float terrain_base = NoisePerlin2D_PO(&noise_terrain_base->np,
|
||||
@@ -294,7 +294,7 @@ float MapgenV6::baseTerrainLevelFromMap(v2s16 p)
|
||||
|
||||
float MapgenV6::baseTerrainLevelFromMap(int index)
|
||||
{
|
||||
if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
|
||||
if (spflags & MGV6_FLAT)
|
||||
return water_level;
|
||||
|
||||
float terrain_base = noise_terrain_base->result[index];
|
||||
@@ -402,7 +402,7 @@ bool MapgenV6::getHaveAppleTree(v2s16 p)
|
||||
|
||||
float MapgenV6::getMudAmount(int index)
|
||||
{
|
||||
if ((spflags & MGV6_FLAT) || (flags & MG_FLAT))
|
||||
if (spflags & MGV6_FLAT)
|
||||
return MGV6_AVERAGE_MUD_AMOUNT;
|
||||
|
||||
/*return ((float)AVERAGE_MUD_AMOUNT + 2.0 * noise2d_perlin(
|
||||
@@ -599,7 +599,7 @@ void MapgenV6::makeChunk(BlockMakeData *data)
|
||||
growGrass();
|
||||
|
||||
// Generate some trees, and add grass, if a jungle
|
||||
if ((spflags & MGV6_TREES) || (flags & MG_TREES))
|
||||
if (spflags & MGV6_TREES)
|
||||
placeTreesAndJungleGrass();
|
||||
|
||||
// Generate the registered decorations
|
||||
@@ -626,7 +626,7 @@ void MapgenV6::calculateNoise()
|
||||
int fx = full_node_min.X;
|
||||
int fz = full_node_min.Z;
|
||||
|
||||
if (!((spflags & MGV6_FLAT) || (flags & MG_FLAT))) {
|
||||
if (!(spflags & MGV6_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);
|
||||
|
Reference in New Issue
Block a user