summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pathfind.cc
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2011-02-24 18:15:28 +0100
committerRaphael Langella <raphael.langella@gmail.com>2011-02-24 19:21:04 +0100
commit787dc3fefd8f658f18945b53c7e57b5c7b480726 (patch)
tree42df2164205f5f91990191bfe45d856588652415 /crawl-ref/source/mon-pathfind.cc
parent5cd8323801a1e8601c91708ea7a45aab84bc4a4f (diff)
downloadcrawl-ref-787dc3fefd8f658f18945b53c7e57b5c7b480726.tar.gz
crawl-ref-787dc3fefd8f658f18945b53c7e57b5c7b480726.zip
Monsters use pathfinding to go around shallow water.
Diffstat (limited to 'crawl-ref/source/mon-pathfind.cc')
-rw-r--r--crawl-ref/source/mon-pathfind.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-pathfind.cc b/crawl-ref/source/mon-pathfind.cc
index 0622e62f98..8637b46746 100644
--- a/crawl-ref/source/mon-pathfind.cc
+++ b/crawl-ref/source/mon-pathfind.cc
@@ -366,8 +366,11 @@ std::vector<coord_def> monster_pathfind::calc_waypoints()
#endif
for (unsigned int i = 1; i < path.size(); i++)
{
- if (can_go_straight(pos, path[i], can_move) && mons_traversable(path[i]))
+ if (can_go_straight(mons, pos, path[i], can_move)
+ && mons_traversable(path[i]))
+ {
continue;
+ }
else
{
pos = path[i-1];