aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-09-17 02:54:17 +0100
committerparamat <mat.gregory@virginmedia.com>2017-09-17 03:20:20 +0100
commit76817fdf98b1597c569267bc751f4f285302721a (patch)
tree5fb965574648609bf86883b6cf8661b609fc9382
parent5b6d4482eeee1925331d6ec122dd10cdc1aa7a30 (diff)
downloadminetest-76817fdf98b1597c569267bc751f4f285302721a.tar.gz
minetest-76817fdf98b1597c569267bc751f4f285302721a.tar.bz2
minetest-76817fdf98b1597c569267bc751f4f285302721a.zip
Biome generation: Fix layers of 'filler' nodes at biome y limits
Error was exposed by commit a1389c38658fe69c3bd25c3099bae9a4e51ed401 'nplaced' was not set to U16_MAX when biome 'stone' was placed, so when biome was recalculated in a column of stone, the 'nplaced' value caused a few remaining filler nodes to be placed. Occurs when the lower biome has a deeper depth of 'top' plus 'filler' than the upper biome.
-rw-r--r--src/mapgen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp
index 1d72ec037..72c075466 100644
--- a/src/mapgen.cpp
+++ b/src/mapgen.cpp
@@ -722,6 +722,7 @@ void MapgenBasic::generateBiomes(MgStoneType *mgstone_type,
nplaced++;
} else {
vm->m_data[vi] = MapNode(biome->c_stone);
+ nplaced = U16_MAX; // Disable top/filler placement
}
air_above = false;