summaryrefslogtreecommitdiff
path: root/src/mapgen_v7.cpp
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2014-12-20 05:25:13 +0000
committerkwolekr <kwolekr@minetest.net>2014-12-20 14:50:13 -0500
commit173e1f6014dd975bdb737dfeecb87bfdf60b3cce (patch)
tree925aa0035a31640cef8e7a92f2b0625cab323d71 /src/mapgen_v7.cpp
parent1e8e700ee645fa642e868c79c2717c82d3509f55 (diff)
downloadminetest-173e1f6014dd975bdb737dfeecb87bfdf60b3cce.tar.gz
minetest-173e1f6014dd975bdb737dfeecb87bfdf60b3cce.tar.bz2
minetest-173e1f6014dd975bdb737dfeecb87bfdf60b3cce.zip
Re-add hacky fix for underwater grass, to fix mgv7 user's biomes
Diffstat (limited to 'src/mapgen_v7.cpp')
-rw-r--r--src/mapgen_v7.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mapgen_v7.cpp b/src/mapgen_v7.cpp
index dce5f6131..2f55964d8 100644
--- a/src/mapgen_v7.cpp
+++ b/src/mapgen_v7.cpp
@@ -122,13 +122,13 @@ MapgenV7::~MapgenV7() {
MapgenV7Params::MapgenV7Params() {
spflags = MGV7_MOUNTAINS | MGV7_RIDGES;
- np_terrain_base = NoiseParams(4, 70, v3f(300, 300, 300), 82341, 6, 0.7, 2.0);
- np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0);
- np_terrain_persist = NoiseParams(0.6, 0.1, v3f(500, 500, 500), 539, 3, 0.6, 2.0);
+ np_terrain_base = NoiseParams(4, 70, v3f(300, 300, 300), 82341, 6, 0.7, 2.0);
+ np_terrain_alt = NoiseParams(4, 25, v3f(600, 600, 600), 5934, 5, 0.6, 2.0);
+ np_terrain_persist = NoiseParams(0.6, 0.1, v3f(500, 500, 500), 539, 3, 0.6, 2.0);
np_height_select = NoiseParams(-0.5, 1, v3f(250, 250, 250), 4213, 5, 0.69, 2.0);
- np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 4, 0.7, 2.0);
- np_mount_height = NoiseParams(100, 30, v3f(500, 500, 500), 72449, 4, 0.6, 2.0);
- np_ridge_uwater = NoiseParams(0, 1, v3f(500, 500, 500), 85039, 4, 0.6, 2.0);
+ np_filler_depth = NoiseParams(0, 1.2, v3f(150, 150, 150), 261, 4, 0.7, 2.0);
+ np_mount_height = NoiseParams(100, 30, v3f(500, 500, 500), 72449, 4, 0.6, 2.0);
+ np_ridge_uwater = NoiseParams(0, 1, v3f(500, 500, 500), 85039, 4, 0.6, 2.0);
np_mountain = NoiseParams(0, 1, v3f(250, 350, 250), 5333, 5, 0.68, 2.0);
np_ridge = NoiseParams(0, 1, v3f(100, 100, 100), 6467, 4, 0.75, 2.0);
}
@@ -545,10 +545,12 @@ void MapgenV7::generateBiomes() {
if (c_below != CONTENT_AIR) {
if (nplaced < y0_top) {
- if(y < water_level)
- vm->m_data[i] = MapNode(biome->c_filler);
- else
- vm->m_data[i] = MapNode(biome->c_top);
+ // A hack to prevent dirt_with_grass from being
+ // placed below water. TODO: fix later
+ content_t c_place = ((y < water_level) &&
+ (biome->c_top == c_dirt_with_grass)) ?
+ c_dirt : biome->c_top;
+ vm->m_data[i] = MapNode(c_place);
nplaced++;
} else if (nplaced < y0_filler && nplaced >= y0_top) {
vm->m_data[i] = MapNode(biome->c_filler);