1
0
Fork 0

Stop crashing when mob object is already deleted

mapgen
jordan4ibanez 2021-05-05 12:52:07 -04:00
parent 4b327bcf99
commit 37350e81c9
1 changed files with 6 additions and 0 deletions

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