mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-05-18 09:10:36 +02:00
tamed npc/animal wont attack players unless provoked
This commit is contained in:
parent
c0c4c3ea48
commit
42da759407
3
api.lua
3
api.lua
@ -1693,7 +1693,8 @@ function mob_class:general_attack()
|
|||||||
-- remove from list if invisible or unable to attack
|
-- remove from list if invisible or unable to attack
|
||||||
if not damage_enabled or self.attack_players == false
|
if not damage_enabled or self.attack_players == false
|
||||||
or self.owner == objs[n]:get_player_name()
|
or self.owner == objs[n]:get_player_name()
|
||||||
-- or (self.owner and self.type ~= "monster")
|
-- npcs and animals that are tamed will not attack players unless provoked
|
||||||
|
or (self.type ~= "monster" and self.tamed)
|
||||||
or is_invisible(self, objs[n]:get_player_name())
|
or is_invisible(self, objs[n]:get_player_name())
|
||||||
or (self.specific_attack and not check_for("player", self.specific_attack)) then
|
or (self.specific_attack and not check_for("player", self.specific_attack)) then
|
||||||
objs[n] = nil
|
objs[n] = nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user