From 21480b3bdb7783ea72cfba1afc685b30e0481fd2 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Mon, 4 Sep 2023 00:58:03 +0200 Subject: [PATCH] only do after_activate for those mobs we're responsible for --- interface_mobs_api.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface_mobs_api.lua b/interface_mobs_api.lua index 01ed673..ed6625a 100644 --- a/interface_mobs_api.lua +++ b/interface_mobs_api.lua @@ -56,6 +56,11 @@ function yl_speak_up.do_mobs_after_activate(self, staticdata, def, dtime) -- yl_speak_up.log_change("-", "n_"..self.yl_speak_up.id, -- "activated at "..minetest.pos_to_string(self.object:get_pos()), "action") + -- we are not (yet?) responsible for this mob + if(not(self.yl_speak_up)) then + return true + end + if yl_speak_up.status == 2 then self.object:remove() return true