i hate negative numbers
This commit is contained in:
parent
b77c07eef0
commit
4629cde5d4
@ -75,7 +75,7 @@ local function circleVectors(center, radius)
|
||||
end
|
||||
for _, v in pairs(vecs) do
|
||||
local i = 1
|
||||
while i <= #res and (res[i].x ~= v.x or res[i].y ~= v.y) do
|
||||
while i <= #res and (res[i].x ~= v.x or res[i].y ~= v.y) and v.x >= 0 and v.y >= 0 do
|
||||
i = i + 1
|
||||
end
|
||||
if i == #res + 1 or #res == 0 then
|
||||
@ -112,7 +112,7 @@ local aiNature = {
|
||||
["dev_warrior"] = function(self)
|
||||
return function(callback) -- почему так, описано в Task
|
||||
self.owner:try(Tree.behaviors.spellcaster, function(spellB)
|
||||
self.target = pathToClosestCharacter(self.owner, 1)
|
||||
self.target = pathToClosestCharacter(self.owner, 2)
|
||||
local task1 = spellB.spellbook[1]:cast(self.owner, self.target)
|
||||
if task1 then
|
||||
task1(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user