Remove entity where display node not found

This commit is contained in:
Pierre-Yves Rollo 2018-12-08 19:27:08 +01:00
parent e94a1b21f6
commit ffe113c62a

View File

@ -133,6 +133,9 @@ function update_entity(entity)
-- Call on_display_update callback of a node for one of its display entities -- Call on_display_update callback of a node for one of its display entities
ndef.display_entities[entity.name].on_display_update(entity.nodepos, ndef.display_entities[entity.name].on_display_update(entity.nodepos,
entity.object) entity.object)
else
-- Display node has been removed, remove entity also
entity.object:remove()
end end
end end