]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapgen_v6.cpp
Biome API: Make fallback biome stone and water, disable filler
[minetest.git] / src / mapgen_v6.cpp
index 732ec09558200b6d5c1639a0f50c4c27757edbca..9e34aac2d741faa54ea54a15c8e3c116a818985b 100644 (file)
@@ -28,7 +28,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "nodedef.h"
 #include "content_mapnode.h" // For content_mapnode_get_new_name
 #include "voxelalgorithms.h"
-#include "profiler.h"
 #include "settings.h" // For g_settings
 #include "emerge.h"
 #include "dungeongen.h"
@@ -108,6 +107,14 @@ MapgenV6::MapgenV6(int mapgenid, MapgenParams *params, EmergeManager *emerge)
                c_mossycobble = c_cobble;
        if (c_stair_cobble == CONTENT_IGNORE)
                c_stair_cobble = c_cobble;
+       if (c_dirt_with_snow == CONTENT_IGNORE)
+               c_dirt_with_snow = c_dirt_with_grass;
+       if (c_snow == CONTENT_IGNORE)
+               c_snow = CONTENT_AIR;
+       if (c_snowblock == CONTENT_IGNORE)
+               c_snowblock = c_dirt_with_grass;
+       if (c_ice == CONTENT_IGNORE)
+               c_ice = c_water_source;
 }
 
 
@@ -619,7 +626,7 @@ int MapgenV6::generateGround()
        MapNode n_air(CONTENT_AIR), n_water_source(c_water_source);
        MapNode n_stone(c_stone), n_desert_stone(c_desert_stone);
        MapNode n_ice(c_ice);
-       int stone_surface_max_y = -MAP_GENERATION_LIMIT;
+       int stone_surface_max_y = -MAX_MAP_GENERATION_LIMIT;
 
        u32 index = 0;
        for (s16 z = node_min.Z; z <= node_max.Z; z++)