end\r
worldedit.marker_region[name] = nil\r
end\r
+\r
if pos1 ~= nil and pos2 ~= nil then\r
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)\r
+\r
+ local vec = vector.subtract(pos2, pos1)\r
+ local maxside = math.max(vec.x, math.max(vec.y, vec.z))\r
+ local limit = tonumber(minetest.setting_get("active_object_send_range_blocks")) * 16\r
+ if maxside > limit * 1.5 then\r
+ -- The client likely won't be able to see the plane markers as intended anyway,\r
+ -- thus don't place them and also don't load the area into memory\r
+ return\r
+ end\r
+\r
local thickness = 0.2\r
local sizex, sizey, sizez = (1 + pos2.x - pos1.x) / 2, (1 + pos2.y - pos1.y) / 2, (1 + pos2.z - pos1.z) / 2\r
\r