Fix crash when deleting particlespawners
This commit is contained in:
parent
438d22e52e
commit
dc873f4de2
|
@ -95,7 +95,7 @@ mcl_mobs:register_mob("mobs_mc:glow_squid", {
|
|||
psdef.playername = p:get_player_name()
|
||||
table.insert(self.particlespawners[p],minetest.add_particlespawner(psdef))
|
||||
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
|
||||
minetest.delete_particlespawner(ps)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user