make walk:cast stateless
This commit is contained in:
parent
a4e2a2f257
commit
8ad68f914d
@ -38,7 +38,7 @@ function walk:cast(caster, target)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local path = self.path
|
local path = require "lib.pathfinder" (caster:has(Tree.behaviors.positioned).position:floor(), target)
|
||||||
path:pop_front()
|
path:pop_front()
|
||||||
if path:is_empty() then return false end
|
if path:is_empty() then return false end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user