From ffe113c62a10aac12597bf883680e8049edcd310 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 8 Dec 2018 19:27:08 +0100 Subject: [PATCH] Remove entity where display node not found --- display_api/display.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/display_api/display.lua b/display_api/display.lua index eefeac0..a8cee66 100644 --- a/display_api/display.lua +++ b/display_api/display.lua @@ -133,6 +133,9 @@ function update_entity(entity) -- Call on_display_update callback of a node for one of its display entities ndef.display_entities[entity.name].on_display_update(entity.nodepos, entity.object) + else + -- Display node has been removed, remove entity also + entity.object:remove() end end