Fix armor stand entity duplication bug

This commit is contained in:
stujones11 2016-04-16 15:36:48 +01:00
parent 1dd904f5be
commit 59bbc55b73

View File

@ -20,8 +20,10 @@ local function update_entity(pos)
local object = nil
local node = minetest.get_node(pos)
local objects = minetest.get_objects_inside_radius(pos, 1) or {}
pos = vector.round(pos)
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()
if ent then
if ent.name == "3d_armor_stand:armor_entity" then