Re-add hacky fix for underwater grass, to fix mgv7 user's biomes

master
paramat 2014-12-20 05:25:13 +00:00 committed by kwolekr
parent 1e8e700ee6
commit 173e1f6014
2 changed files with 24 additions and 20 deletions

View File

@ -439,10 +439,12 @@ void MapgenV5::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);

View File

@ -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);