1
0
Fork 0

Fix non-monsters being unable to attack

A check in the relevant function excluded all non-monsters from
looking for targets to attack. This removes that check and relies
on the passive attribute of the entity
This commit is contained in:
cora 2022-07-17 00:32:06 +02:00 committed by Gitea
parent 43b888968b
commit a077e4535f
1 changed files with 2 additions and 3 deletions

View File

@ -1905,11 +1905,10 @@ local specific_attack = function(list, what)
return false
end
-- monster find someone to attack
-- find someone to attack
local monster_attack = function(self)
if self.type ~= "monster"
or not damage_enabled
if not damage_enabled
or minetest.is_creative_enabled("")
or self.passive
or self.state == "attack"