only do after_activate for those mobs we're responsible for

This commit is contained in:
Sokomine 2023-09-04 00:58:03 +02:00
parent 04debcb096
commit 21480b3bdb

View File

@ -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