diff options
author | RealBadAngel <maciej.kasatkin@o2.pl> | 2014-06-16 08:45:04 +0200 |
---|---|---|
committer | RealBadAngel <maciej.kasatkin@o2.pl> | 2014-06-17 00:55:04 +0200 |
commit | 9f46cb6745a03f3a435a5a1f8a28a778971f3668 (patch) | |
tree | c3dc8dce8b0155200d65d537ba31329f546200f6 | |
parent | 9d57413af007ae952f08bf1130ee60da472c1099 (diff) | |
download | minetest-9f46cb6745a03f3a435a5a1f8a28a778971f3668.tar.gz minetest-9f46cb6745a03f3a435a5a1f8a28a778971f3668.tar.bz2 minetest-9f46cb6745a03f3a435a5a1f8a28a778971f3668.zip |
L-systems treegen code tweaks.
-rw-r--r-- | src/treegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/treegen.cpp b/src/treegen.cpp index 914479391..542bdf21c 100644 --- a/src/treegen.cpp +++ b/src/treegen.cpp @@ -231,7 +231,7 @@ void make_ltree(ManualMapVoxelManipulator &vmanip, v3s16 p0, INodeDefManager *nd tree_node_placement(vmanip,v3f(position.X,position.Y-1,position.Z+1),dirtnode); tree_node_placement(vmanip,v3f(position.X+1,position.Y-1,position.Z+1),dirtnode); } - if (tree_definition.trunk_type == "crossed") + else if (tree_definition.trunk_type == "crossed") { tree_node_placement(vmanip,v3f(position.X+1,position.Y-1,position.Z),dirtnode); tree_node_placement(vmanip,v3f(position.X-1,position.Y-1,position.Z),dirtnode); @@ -289,7 +289,7 @@ void make_ltree(ManualMapVoxelManipulator &vmanip, v3s16 p0, INodeDefManager *nd tree_trunk_placement(vmanip,v3f(position.X,position.Y,position.Z+1),tree_definition); tree_trunk_placement(vmanip,v3f(position.X+1,position.Y,position.Z+1),tree_definition); } - if (tree_definition.trunk_type == "crossed" && !tree_definition.thin_branches) + else if (tree_definition.trunk_type == "crossed" && !tree_definition.thin_branches) { tree_trunk_placement(vmanip,v3f(position.X+1,position.Y,position.Z),tree_definition); tree_trunk_placement(vmanip,v3f(position.X-1,position.Y,position.Z),tree_definition); @@ -309,7 +309,7 @@ void make_ltree(ManualMapVoxelManipulator &vmanip, v3s16 p0, INodeDefManager *nd tree_trunk_placement(vmanip,v3f(position.X,position.Y,position.Z+1),tree_definition); tree_trunk_placement(vmanip,v3f(position.X+1,position.Y,position.Z+1),tree_definition); } - if ((stack_orientation.empty() && tree_definition.trunk_type == "crossed") || + else if ((stack_orientation.empty() && tree_definition.trunk_type == "crossed") || (!stack_orientation.empty() && tree_definition.trunk_type == "crossed" && !tree_definition.thin_branches)) { tree_trunk_placement(vmanip,v3f(position.X+1,position.Y,position.Z),tree_definition); |