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:
parent
43b888968b
commit
a077e4535f
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user