forked from VoxeLibre/VoxeLibre
Fix crash in mcl_mobs
This commit is contained in:
parent
efb97d59a5
commit
4cb5b26fa9
|
@ -2095,9 +2095,9 @@ local do_states = function(self, dtime)
|
||||||
local dist = vector.distance(p, s)
|
local dist = vector.distance(p, s)
|
||||||
|
|
||||||
-- stop attacking if player invisible or out of range
|
-- stop attacking if player invisible or out of range
|
||||||
if not object_in_range(self, self.attack)
|
if not self.attack
|
||||||
or not self.attack
|
|
||||||
or not self.attack:get_pos()
|
or not self.attack:get_pos()
|
||||||
|
or not object_in_range(self, self.attack)
|
||||||
or self.attack:get_hp() <= 0
|
or self.attack:get_hp() <= 0
|
||||||
or (self.attack:is_player() and mobs.invis[ self.attack:get_player_name() ]) then
|
or (self.attack:is_player() and mobs.invis[ self.attack:get_player_name() ]) then
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue