diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-20 09:01:02 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-20 09:01:02 +0000 |
commit | a324c4ba0fbb3c8b96c549301237db8b6efdea1c (patch) | |
tree | 76fa3ef99d14866663f1c77916e81eca1be1c8c5 | |
parent | d1e44c7637f2348de33d72f484deef0f826aa3f5 (diff) | |
download | crawl-ref-a324c4ba0fbb3c8b96c549301237db8b6efdea1c.tar.gz crawl-ref-a324c4ba0fbb3c8b96c549301237db8b6efdea1c.zip |
Fix 2082997: broken monster pathfinding.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6954 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/monstuff.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 4f233d86fc..07b1040006 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -7040,7 +7040,7 @@ static bool _monster_move(monsters *monster) // If neither does, do nothing. if (good_move[mmov.x + 1][mmov.y + 1] == false) { - int current_distance = grid_distance(monster->pos(), monster->target); + int current_distance = distance(monster->pos(), monster->target); int dir = -1; @@ -7080,8 +7080,8 @@ static bool _monster_move(monsters *monster) int newdir = (dir + 8 + mod) % 8; if (good_move[mon_compass[newdir].x+1][mon_compass[newdir].y+1]) { - dist[i] = grid_distance(monster->pos()+mon_compass[newdir], - monster->target); + dist[i] = distance(monster->pos()+mon_compass[newdir], + monster->target); } else { |