1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-01-11 18:40:25 +01:00

[pclasses] Reduce verification radii previously overlapping

- Fix #381
This commit is contained in:
LeMagnesium 2016-01-14 21:06:34 +01:00
parent 9bcbb1c4e5
commit b4de154668

View File

@ -92,7 +92,7 @@ function pclasses.register_class_switch(cname, params)
pos.y = pos.y + 1
-- Clean remaining entities
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 1)) do
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 0.3)) do
local e = ref:get_luaentity()
if e and e.name == "pclasses:item" then
ref:remove()
@ -110,7 +110,7 @@ function pclasses.register_class_switch(cname, params)
end,
on_timer = function(pos)
pos.y = pos.y + 1
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 1)) do
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 0.3)) do
local e = ref:get_luaentity()
if e and e.name == "pclasses:item" then
return true
@ -126,7 +126,7 @@ function pclasses.register_class_switch(cname, params)
end,
on_destruct = function(pos)
pos.y = pos.y + 1
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 1)) do
for _,ref in pairs(minetest.get_objects_inside_radius(pos, 0.3)) do
local e = ref:get_luaentity()
if e and e.name == "pclasses:item" then
ref:remove()