mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-14 20:00:18 +01:00
cant attack if running away
This commit is contained in:
parent
bff313267b
commit
f2cc0446b0
3
api.lua
3
api.lua
@ -6,7 +6,7 @@ local use_cmi = minetest.global_exists("cmi")
|
||||
|
||||
mobs = {
|
||||
mod = "redo",
|
||||
version = "20200412",
|
||||
version = "20200426",
|
||||
intllib = S,
|
||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||
}
|
||||
@ -1671,6 +1671,7 @@ function mob_class:general_attack()
|
||||
|
||||
-- return if already attacking, passive or docile during day
|
||||
if self.passive
|
||||
or self.state == "runaway"
|
||||
or self.state == "attack"
|
||||
or self:day_docile() then
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user