forked from mtcontrib/3d_armor
Fix armor stand entity duplication bug
This commit is contained in:
parent
1dd904f5be
commit
59bbc55b73
@ -20,8 +20,10 @@ local function update_entity(pos)
|
|||||||
local object = nil
|
local object = nil
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 1) or {}
|
local objects = minetest.get_objects_inside_radius(pos, 1) or {}
|
||||||
|
pos = vector.round(pos)
|
||||||
for _, obj in pairs(objects) do
|
for _, obj in pairs(objects) do
|
||||||
if vector.equals(obj:getpos(), pos) then
|
local p = vector.round(obj:getpos())
|
||||||
|
if vector.equals(p, pos) then
|
||||||
local ent = obj:get_luaentity()
|
local ent = obj:get_luaentity()
|
||||||
if ent then
|
if ent then
|
||||||
if ent.name == "3d_armor_stand:armor_entity" then
|
if ent.name == "3d_armor_stand:armor_entity" then
|
||||||
|
Loading…
Reference in New Issue
Block a user