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