1
0
Fork 0

Fix crash in mcl_mobs

objects
Wuzzy 2020-02-25 16:09:26 +01:00
parent efb97d59a5
commit 4cb5b26fa9
1 changed files with 2 additions and 2 deletions

View File

@ -2095,9 +2095,9 @@ local do_states = function(self, dtime)
local dist = vector.distance(p, s)
-- stop attacking if player invisible or out of range
if not object_in_range(self, self.attack)
or not self.attack
if not self.attack
or not self.attack:get_pos()
or not object_in_range(self, self.attack)
or self.attack:get_hp() <= 0
or (self.attack:is_player() and mobs.invis[ self.attack:get_player_name() ]) then