forked from MineClone5/MineClone5
Stop crashing when mob object is already deleted
This commit is contained in:
parent
4b327bcf99
commit
37350e81c9
|
@ -87,6 +87,12 @@ end
|
||||||
|
|
||||||
|
|
||||||
mobs.death_logic = function(self, dtime)
|
mobs.death_logic = function(self, dtime)
|
||||||
|
|
||||||
|
--stop crashing game when object is nil
|
||||||
|
if not self or not self.object or not self.object:get_luaentity() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
self.death_animation_timer = self.death_animation_timer + dtime
|
self.death_animation_timer = self.death_animation_timer + dtime
|
||||||
|
|
||||||
--get all attached entities and sort through them
|
--get all attached entities and sort through them
|
||||||
|
|
Loading…
Reference in New Issue