51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <irr_v3d.h>
+#include "irr_v3d.h"
#include <stack>
+#include "util/numeric.h"
+#include "util/mathconstants.h"
#include "noise.h"
#include "map.h"
#include "environment.h"
for(x=-size; x<size+1; x++)
for(y=-size; y<size+1; y++)
for(z=-size; z<size+1; z++)
- if (abs(x) == size and abs(y) == size and abs(z) == size)
+ if (abs(x) == size && abs(y) == size && abs(z) == size)
{
make_tree_leaves_placement(vmanip,v3f(p0.X+position.X+x+1,p0.Y+position.Y+y,p0.Z+position.Z+z),tree_definition);
make_tree_leaves_placement(vmanip,v3f(p0.X+position.X+x-1,p0.Y+position.Y+y,p0.Z+position.Z+z),tree_definition);
void make_tree_node_placement(ManualMapVoxelManipulator &vmanip, v3f p0,
MapNode node)
{
- v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z));
+ v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z));
if(vmanip.m_area.contains(p1) == false)
return;
u32 vi = vmanip.m_area.index(p1);
void make_tree_trunk_placement(ManualMapVoxelManipulator &vmanip, v3f p0,
TreeDef &tree_definition)
{
- v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z));
+ v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z));
if(vmanip.m_area.contains(p1) == false)
return;
u32 vi = vmanip.m_area.index(p1);
void make_tree_leaves_placement(ManualMapVoxelManipulator &vmanip, v3f p0,
TreeDef &tree_definition)
{
- v3s16 p1 = v3s16(round(p0.X),round(p0.Y),round(p0.Z));
+ v3s16 p1 = v3s16(myround(p0.X),myround(p0.Y),myround(p0.Z));
if(vmanip.m_area.contains(p1) == false)
return;
u32 vi = vmanip.m_area.index(p1);
}
#endif
-}; // namespace treegen
+}; // namespace treegen
\ No newline at end of file