Fixup fences
This commit is contained in:
parent
488f61ba1b
commit
9ea8945ff4
|
@ -306,7 +306,7 @@ function mob_class:gopath(target, callback_arrived, prioritised)
|
|||
wp[i+1].action = {type = "door", action = "close", target = wp[i].pos}
|
||||
end
|
||||
-- do not jump on fences and walls, but try to walk around
|
||||
elseif bdef and ((bdef.groups.fence or 0) > 0 or (bdef.groups.wall or 0) > 0) and wp[i].pos.y > wp[i-1].pos.y then
|
||||
elseif bdef and i > 1 and ((bdef.groups.fence or 0) > 0 or (bdef.groups.wall or 0) > 0) and wp[i].pos.y > wp[i-1].pos.y then
|
||||
-- find end of wall(s)
|
||||
local j = i + 1
|
||||
while j <= #wp do
|
||||
|
|
Loading…
Reference in New Issue