mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Stop crashing when mob object is already deleted
This commit is contained in:
parent
4b327bcf99
commit
37350e81c9
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue