Stop crashing when mob object is already deleted

This commit is contained in:
jordan4ibanez 2021-05-05 12:52:07 -04:00
parent 4b327bcf99
commit 37350e81c9

View File

@ -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