diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-28 22:37:27 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-28 22:37:27 -0500 |
commit | 863379a4c68b9862ea6913c1b1e475d022aba100 (patch) | |
tree | 00c6089cdf46a1bfaae17bc0c52ed90db47976d2 /src/mg_decoration.cpp | |
parent | c5faa644056c892ccf5e41cfde87a5b107149951 (diff) | |
download | minetest-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.cpp | 3 |
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(); |