Merge pull request 'fix_spider_eyes_memory_fault+die' (#2721) from fix_spider_eyes_memory_fault+die into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2721
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
epCode 2022-10-06 17:45:29 +00:00
commit 5507f62142
2 changed files with 6 additions and 6 deletions

View file

@ -31,12 +31,12 @@ minetest.register_entity("mobs_mc:ender_eyes", {
textures = { textures = {
"mobs_mc_enderman_eyes.png", "mobs_mc_enderman_eyes.png",
}, },
on_activate = function(self) on_step = function(self)
minetest.after(0.1, function() if self and self.object then
if not self.object:get_attach() then if not self.object:get_attach() then
self.object:remove() self.object:remove()
end end
end) end
end, end,
glow = 50, glow = 50,
}) })

View file

@ -18,12 +18,12 @@ minetest.register_entity("mobs_mc:spider_eyes", {
textures = { textures = {
"mobs_mc_spider_eyes.png", "mobs_mc_spider_eyes.png",
}, },
on_activate = function(self) on_step = function(self)
minetest.after(0.1, function() if self and self.object then
if not self.object:get_attach() then if not self.object:get_attach() then
self.object:remove() self.object:remove()
end end
end) end
end, end,
glow = 50, glow = 50,
}) })