1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Process ABMs in a spherical volume instead of cubic

Increase active_block_range default to a 3 mapblock radius.
This commit is contained in:
Lars Hofhansl 2016-12-10 10:31:17 -08:00 committed by paramat
parent 923a8f1983
commit 2f59a0c840
4 changed files with 8 additions and 5 deletions

View file

@ -397,8 +397,11 @@ void fillRadiusBlock(v3s16 p0, s16 r, std::set<v3s16> &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);
}
}
}