summaryrefslogtreecommitdiff
path: root/src/mg_decoration.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-28 22:37:27 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-28 22:37:27 -0500
commit863379a4c68b9862ea6913c1b1e475d022aba100 (patch)
tree00c6089cdf46a1bfaae17bc0c52ed90db47976d2 /src/mg_decoration.cpp
parentc5faa644056c892ccf5e41cfde87a5b107149951 (diff)
downloadminetest-863379a4c68b9862ea6913c1b1e475d022aba100.tar.gz
minetest-863379a4c68b9862ea6913c1b1e475d022aba100.tar.bz2
minetest-863379a4c68b9862ea6913c1b1e475d022aba100.zip
Decoration: Add height_min and height_max parameters
Also set default height_min/height_max to -31000 and 31000, respectively, for ore and biomes
Diffstat (limited to 'src/mg_decoration.cpp')
-rw-r--r--src/mg_decoration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mg_decoration.cpp b/src/mg_decoration.cpp
index 50e8fb05a..dec82a638 100644
--- a/src/mg_decoration.cpp
+++ b/src/mg_decoration.cpp
@@ -140,7 +140,8 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
mg->heightmap[mapindex] :
mg->findGroundLevel(v2s16(x, z), nmin.Y, nmax.Y);
- if (y < nmin.Y || y > nmax.Y)
+ if (y < nmin.Y || y > nmax.Y ||
+ y < height_min || y > height_max)
continue;
int height = getHeight();