1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-25 02:00:21 +01:00

stop attacking when player turns invisible

This commit is contained in:
TenPlus1 2016-06-09 18:48:38 +01:00
parent d281ad3bb1
commit 54beb82686

View File

@ -1342,7 +1342,8 @@ local do_states = function(self, dtime)
if dist > self.view_range if dist > self.view_range
or not self.attack or not self.attack
or not self.attack:getpos() or not self.attack:getpos()
or self.attack:get_hp() <= 0 then or self.attack:get_hp() <= 0
or (self.attack:is_player() and invisibility[ self.attack:get_player_name() ]) then
--print(" ** stop attacking **", dist, self.view_range) --print(" ** stop attacking **", dist, self.view_range)
self.state = "stand" self.state = "stand"