Starbeamrainbowlabs 2018-06-09 14:11:25 +01:00 committed by GitHub
parent 43f395ad02
commit aadee6a5ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,19 +29,12 @@ function worldedit.ellipsoid(position, radius, target_node)
for x = -radius.x, radius.x do for x = -radius.x, radius.x do
-- If we're inside the ellipse, then fill it in -- If we're inside the ellipse, then fill it in
if math.abs(z) <= radius.z and if (x/radius.x)*(x/radius.x) + (y/radius.y)*(y/radius.y) + (z/radius.z)*(z/radius.z) <= 1 then
math.abs(y) <= radius.y and
math.abs(x) <= radius.x and
worldeditadditions.vector.lengthsquared({ x = x, y = y, z = z }) < radius_distance_sq then
data[i] = node_id data[i] = node_id
count = count + 1 count = count + 1
else
minetest.log("action", "x: " .. x .. ", radius.x: " .. radius.x)
minetest.log("action", "y: " .. y .. ", radius.y: " .. radius.y)
minetest.log("action", "z: " .. z .. ", radius.z: " .. radius.z)
minetest.log("action", "***")
end end