mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
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)
|
||||
|
||||
--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
|
||||
|
||||
--get all attached entities and sort through them
|
||||
|
Loading…
Reference in New Issue
Block a user