mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-25 04:13:44 +01:00
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()
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user