Skip to content
Snippets Groups Projects
Commit 38482d26 authored by paramat's avatar paramat
Browse files

Biome API: Enable biome generation to lower world limit

Decorations: Remove lower limit of water level for placement
parent bb5f830d
No related branches found
No related tags found
No related merge requests found
...@@ -327,11 +327,9 @@ void MapgenV5::calculateNoise() ...@@ -327,11 +327,9 @@ void MapgenV5::calculateNoise()
noise_cave2->perlinMap3D(x, y, z); noise_cave2->perlinMap3D(x, y, z);
} }
if (node_max.Y >= BIOMEGEN_BASE_V5) { noise_filler_depth->perlinMap2D(x, z);
noise_filler_depth->perlinMap2D(x, z); noise_heat->perlinMap2D(x, z);
noise_heat->perlinMap2D(x, z); noise_humidity->perlinMap2D(x, z);
noise_humidity->perlinMap2D(x, z);
}
//printf("calculateNoise: %dus\n", t.stop()); //printf("calculateNoise: %dus\n", t.stop());
} }
...@@ -396,9 +394,6 @@ int MapgenV5::generateBaseTerrain() ...@@ -396,9 +394,6 @@ int MapgenV5::generateBaseTerrain()
MgStoneType MapgenV5::generateBiomes(float *heat_map, float *humidity_map) MgStoneType MapgenV5::generateBiomes(float *heat_map, float *humidity_map)
{ {
if (node_max.Y < BIOMEGEN_BASE_V5)
return STONE;
v3s16 em = vm->m_area.getExtent(); v3s16 em = vm->m_area.getExtent();
u32 index = 0; u32 index = 0;
MgStoneType stone_type = STONE; MgStoneType stone_type = STONE;
......
...@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -23,7 +23,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h" #include "mapgen.h"
#define LARGE_CAVE_DEPTH -256 #define LARGE_CAVE_DEPTH -256
#define BIOMEGEN_BASE_V5 -192
/////////////////// Mapgen V5 flags /////////////////// Mapgen V5 flags
//#define MGV5_ 0x01 //#define MGV5_ 0x01
......
...@@ -362,11 +362,9 @@ void MapgenV7::calculateNoise() ...@@ -362,11 +362,9 @@ void MapgenV7::calculateNoise()
noise_mount_height->perlinMap2D(x, z); noise_mount_height->perlinMap2D(x, z);
} }
if (node_max.Y >= BIOMEGEN_BASE_V7) { noise_filler_depth->perlinMap2D(x, z);
noise_filler_depth->perlinMap2D(x, z); noise_heat->perlinMap2D(x, z);
noise_heat->perlinMap2D(x, z); noise_humidity->perlinMap2D(x, z);
noise_humidity->perlinMap2D(x, z);
}
//printf("calculateNoise: %dus\n", t.stop()); //printf("calculateNoise: %dus\n", t.stop());
} }
...@@ -591,9 +589,6 @@ void MapgenV7::generateRidgeTerrain() ...@@ -591,9 +589,6 @@ void MapgenV7::generateRidgeTerrain()
MgStoneType MapgenV7::generateBiomes(float *heat_map, float *humidity_map) MgStoneType MapgenV7::generateBiomes(float *heat_map, float *humidity_map)
{ {
if (node_max.Y < BIOMEGEN_BASE_V7)
return STONE;
v3s16 em = vm->m_area.getExtent(); v3s16 em = vm->m_area.getExtent();
u32 index = 0; u32 index = 0;
MgStoneType stone_type = STONE; MgStoneType stone_type = STONE;
......
...@@ -22,8 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc., ...@@ -22,8 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen.h" #include "mapgen.h"
#define BIOMEGEN_BASE_V7 -192
/////////////////// Mapgen V7 flags /////////////////// Mapgen V7 flags
#define MGV7_MOUNTAINS 0x01 #define MGV7_MOUNTAINS 0x01
#define MGV7_RIDGES 0x02 #define MGV7_RIDGES 0x02
......
...@@ -129,7 +129,6 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax) ...@@ -129,7 +129,6 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
s16 y = mg->heightmap ? s16 y = mg->heightmap ?
mg->heightmap[mapindex] : mg->heightmap[mapindex] :
mg->findGroundLevel(v2s16(x, z), nmin.Y, nmax.Y); mg->findGroundLevel(v2s16(x, z), nmin.Y, nmax.Y);
y = MYMAX(y, mg->water_level);
if (y < nmin.Y || y > nmax.Y || if (y < nmin.Y || y > nmax.Y ||
y < y_min || y > y_max) y < y_min || y > y_max)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment