aboutsummaryrefslogtreecommitdiff
path: root/src/treegen.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-03-16 17:06:11 -0400
committerkwolekr <kwolekr@minetest.net>2013-03-16 17:06:11 -0400
commit6823ce99a7deabe410dd8b143b688cd364490cec (patch)
treeeee1243f8c1e10f240abcda7a0c25abe08483665 /src/treegen.cpp
parent1f1ad9fd23b07a1c1b5477ee0dbf2c4fdaabccef (diff)
downloadminetest-6823ce99a7deabe410dd8b143b688cd364490cec.tar.gz
minetest-6823ce99a7deabe410dd8b143b688cd364490cec.tar.bz2
minetest-6823ce99a7deabe410dd8b143b688cd364490cec.zip
Re-add jungles, apple trees
Diffstat (limited to 'src/treegen.cpp')
-rw-r--r--src/treegen.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/treegen.cpp b/src/treegen.cpp
index 5ddf1132d..9df528a21 100644
--- a/src/treegen.cpp
+++ b/src/treegen.cpp
@@ -510,8 +510,15 @@ v3f transposeMatrix(irr::core::matrix4 M, v3f v)
void make_jungletree(VoxelManipulator &vmanip, v3s16 p0,
INodeDefManager *ndef, int seed)
{
- MapNode treenode(ndef->getId("mapgen_jungletree"));
- MapNode leavesnode(ndef->getId("mapgen_leaves"));
+ content_t c_tree = ndef->getId("mapgen_jungletree");
+ content_t c_leaves = ndef->getId("mapgen_jungleleaves");
+ if (c_tree == CONTENT_IGNORE)
+ c_tree = ndef->getId("mapgen_tree");
+ if (c_leaves == CONTENT_IGNORE)
+ c_leaves = ndef->getId("mapgen_leaves");
+
+ MapNode treenode(c_tree);
+ MapNode leavesnode(c_leaves);
PseudoRandom pr(seed);
for(s16 x=-1; x<=1; x++)