1
0
Fork 0

Fix crash when deleting particlespawners

This commit is contained in:
cora 2022-10-09 23:21:01 +02:00 committed by Gitea
parent 438d22e52e
commit dc873f4de2
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ mcl_mobs:register_mob("mobs_mc:glow_squid", {
psdef.playername = p:get_player_name() psdef.playername = p:get_player_name()
table.insert(self.particlespawners[p],minetest.add_particlespawner(psdef)) table.insert(self.particlespawners[p],minetest.add_particlespawner(psdef))
end end
elseif vector.distance(pos,p:get_pos()) > 150 then elseif vector.distance(pos,p:get_pos()) > 150 and self.particlespawners[p] then
for _,ps in pairs(self.particlespawners[p]) do for _,ps in pairs(self.particlespawners[p]) do
minetest.delete_particlespawner(ps) minetest.delete_particlespawner(ps)
end end