Skip to content
Snippets Groups Projects
Commit 4a89b531 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@1055 51575b47-30f0-44d4-a5cc-537603b46e54
parent 7203c506
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ newAI("flee_dmap", function(self)
local sx, sy = util.coordAddDir(self.x, self.y, i)
local cd = a:distanceMap(sx, sy)
-- print("looking for dmap", dir, i, "::", c, cd)
if not cd or (cd < c and self:canMove(sx, sy)) then c = cd; dir = i end
if not cd or (c and (cd < c and self:canMove(sx, sy))) then c = cd; dir = i end
end
return self:moveDirection(util.coordAddDir(self.x, self.y, dir))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment