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
wood_api
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 return false
end end
-- monster find someone to attack -- find someone to attack
local monster_attack = function(self) local monster_attack = function(self)
if self.type ~= "monster" if not damage_enabled
or not damage_enabled
or minetest.is_creative_enabled("") or minetest.is_creative_enabled("")
or self.passive or self.passive
or self.state == "attack" or self.state == "attack"