From 2f59a0c840e9101c87e2d59fabf34116b3328121 Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Sat, 10 Dec 2016 10:31:17 -0800 Subject: Process ABMs in a spherical volume instead of cubic Increase active_block_range default to a 3 mapblock radius. --- src/environment.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/environment.cpp') diff --git a/src/environment.cpp b/src/environment.cpp index 13c64b37c..3d4a2efc1 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -397,8 +397,11 @@ void fillRadiusBlock(v3s16 p0, s16 r, std::set &list) for(p.Y=p0.Y-r; p.Y<=p0.Y+r; p.Y++) for(p.Z=p0.Z-r; p.Z<=p0.Z+r; p.Z++) { - // Set in list - list.insert(p); + // limit to a sphere + if (p.getDistanceFrom(p0) <= r) { + // Set in list + list.insert(p); + } } } -- cgit v1.2.3