1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Mapgen: Remove calculateNoise from most mapgens

This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.
This commit is contained in:
kwolekr 2016-05-20 03:37:31 -04:00
parent c5968049bb
commit 0df5c01a8c
10 changed files with 31 additions and 111 deletions

View file

@ -386,6 +386,8 @@ MgStoneType MapgenBasic::generateBiomes()
u32 index = 0;
MgStoneType stone_type = MGSTONE_STONE;
noise_filler_depth->perlinMap2D(node_min.X, node_min.Z);
for (s16 z = node_min.Z; z <= node_max.Z; z++)
for (s16 x = node_min.X; x <= node_max.X; x++, index++) {
Biome *biome = NULL;