X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fbiome.cpp;h=e1dfc47afbb021c31bf06e03a79d7f27c8d3d327;hb=58e6d25e033c76dc91aaac18fdeda92ac23fe0e1;hp=19630019fc10728baacf004198998059bcf7396d;hpb=18d7bc7fa1f2621eb593969b7bcccfeb4918c05f;p=oweals%2Fminetest.git diff --git a/src/biome.cpp b/src/biome.cpp index 19630019f..e1dfc47af 100644 --- a/src/biome.cpp +++ b/src/biome.cpp @@ -21,13 +21,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "nodedef.h" #include "map.h" //for ManualMapVoxelManipulator #include "log.h" +#include "util/numeric.h" #include "main.h" +#include "util/mathconstants.h" +#include "porting.h" - -NoiseParams nparams_biome_def_heat = - {50, 50, v3f(500.0, 500.0, 500.0), 5349, 3, 0.70}; -NoiseParams nparams_biome_def_humidity = - {50, 50, v3f(500.0, 500.0, 500.0), 842, 3, 0.55}; +NoiseParams nparams_biome_def_heat(50, 50, v3f(500.0, 500.0, 500.0), 5349, 3, 0.70); +NoiseParams nparams_biome_def_humidity(50, 50, v3f(500.0, 500.0, 500.0), 842, 3, 0.55); BiomeDefManager::BiomeDefManager() { @@ -41,11 +41,21 @@ BiomeDefManager::BiomeDefManager() { b->id = 0; b->name = "Default"; b->flags = 0; + + b->depth_top = 0; + b->depth_filler = 0; - b->c_top = CONTENT_AIR; - b->depth_top = 0; - b->c_filler = CONTENT_AIR; - b->depth_filler = 0; + b->nname_top = "air"; + b->nname_filler = "air"; + b->nname_water = "mapgen_water_source"; + b->nname_dust = "air"; + b->nname_dust_water = "mapgen_water_source"; + + b->c_top = CONTENT_IGNORE; + b->c_filler = CONTENT_IGNORE; + b->c_water = CONTENT_IGNORE; + b->c_dust = CONTENT_IGNORE; + b->c_dust_water = CONTENT_IGNORE; b->height_min = -MAP_GENERATION_LIMIT; b->height_max = MAP_GENERATION_LIMIT; @@ -101,7 +111,7 @@ void BiomeDefManager::resolveNodeNames(INodeDefManager *ndef) { biome_registration_finished = true; - for (size_t i = 1; i < biomes.size(); i++) { + for (size_t i = 0; i < biomes.size(); i++) { b = biomes[i]; b->c_top = ndef->getId(b->nname_top);