Fix occassional crash when mummy dies

This commit is contained in:
Wuzzy 2020-04-06 14:35:54 +02:00
parent 0629d3b6ed
commit 0974de93e4

View File

@ -128,6 +128,7 @@ spawner_DEF.on_step = function(self, dtime)
if self.timer > 1 then if self.timer > 1 then
if n and n.name and n.name ~= "tsm_pyramids:spawner_mummy" then if n and n.name and n.name ~= "tsm_pyramids:spawner_mummy" then
self.object:remove() self.object:remove()
return
end end
end end
end end
@ -244,6 +245,7 @@ MUMMY_DEF.on_step = function(self, dtime)
self.on_death(self) self.on_death(self)
end end
self.object:remove() self.object:remove()
return
else else
hit(self) hit(self)
self.sound_timer = 0 self.sound_timer = 0