X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmapgen_v6.cpp;h=cd337b380f7f087fcc771794850d240ab81f782c;hb=1105a14bccefb48a0e264fe19190c39629259338;hp=ec33fee08413972332a24d88b09ab73e161c2b04;hpb=c42753338924bb29c61081c9f269772f89bcd808;p=minetest.git diff --git a/src/mapgen_v6.cpp b/src/mapgen_v6.cpp index ec33fee08..cd337b380 100644 --- a/src/mapgen_v6.cpp +++ b/src/mapgen_v6.cpp @@ -145,19 +145,19 @@ MapgenV6::~MapgenV6() } -MapgenV6Params::MapgenV6Params() +MapgenV6Params::MapgenV6Params(): + np_terrain_base (-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0), + np_terrain_higher (20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0), + np_steepness (0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0), + np_height_select (0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0), + np_mud (4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0), + np_beach (0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0), + np_biome (0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0), + np_cave (6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0), + np_humidity (0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0), + np_trees (0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0), + np_apple_trees (0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0) { - np_terrain_base = NoiseParams(-4, 20.0, v3f(250.0, 250.0, 250.0), 82341, 5, 0.6, 2.0); - np_terrain_higher = NoiseParams(20, 16.0, v3f(500.0, 500.0, 500.0), 85039, 5, 0.6, 2.0); - np_steepness = NoiseParams(0.85, 0.5, v3f(125.0, 125.0, 125.0), -932, 5, 0.7, 2.0); - np_height_select = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 4213, 5, 0.69, 2.0); - np_mud = NoiseParams(4, 2.0, v3f(200.0, 200.0, 200.0), 91013, 3, 0.55, 2.0); - np_beach = NoiseParams(0, 1.0, v3f(250.0, 250.0, 250.0), 59420, 3, 0.50, 2.0); - np_biome = NoiseParams(0, 1.0, v3f(500.0, 500.0, 500.0), 9130, 3, 0.50, 2.0); - np_cave = NoiseParams(6, 6.0, v3f(250.0, 250.0, 250.0), 34329, 3, 0.50, 2.0); - np_humidity = NoiseParams(0.5, 0.5, v3f(500.0, 500.0, 500.0), 72384, 3, 0.50, 2.0); - np_trees = NoiseParams(0, 1.0, v3f(125.0, 125.0, 125.0), 2, 4, 0.66, 2.0); - np_apple_trees = NoiseParams(0, 1.0, v3f(100.0, 100.0, 100.0), 342902, 3, 0.45, 2.0); } @@ -455,19 +455,20 @@ BiomeV6Type MapgenV6::getBiome(int index, v2s16 p) } return BT_NORMAL; - } else { - if (d > freq_desert) - return BT_DESERT; + } - if ((spflags & MGV6_BIOMEBLEND) && (d > freq_desert - 0.10) && - ((noise2d(p.X, p.Y, seed) + 1.0) > (freq_desert - d) * 20.0)) - return BT_DESERT; + if (d > freq_desert) + return BT_DESERT; - if ((spflags & MGV6_JUNGLES) && h > 0.75) - return BT_JUNGLE; + if ((spflags & MGV6_BIOMEBLEND) && (d > freq_desert - 0.10) && + ((noise2d(p.X, p.Y, seed) + 1.0) > (freq_desert - d) * 20.0)) + return BT_DESERT; + + if ((spflags & MGV6_JUNGLES) && h > 0.75) + return BT_JUNGLE; + + return BT_NORMAL; - return BT_NORMAL; - } } @@ -511,13 +512,6 @@ void MapgenV6::makeChunk(BlockMakeData *data) central_area_size = node_max - node_min + v3s16(1, 1, 1); assert(central_area_size.X == central_area_size.Z); - int volume_blocks = (blockpos_max.X - blockpos_min.X + 1) - * (blockpos_max.Y - blockpos_min.Y + 1) - * (blockpos_max.Z - blockpos_max.Z + 1); - - volume_nodes = volume_blocks * - MAP_BLOCKSIZE * MAP_BLOCKSIZE * MAP_BLOCKSIZE; - // Create a block-specific seed blockseed = get_blockseed(data->seed, full_node_min);