diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-02-24 18:15:28 +0100 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-02-24 19:21:04 +0100 |
commit | 787dc3fefd8f658f18945b53c7e57b5c7b480726 (patch) | |
tree | 42df2164205f5f91990191bfe45d856588652415 /crawl-ref/source/mon-pathfind.cc | |
parent | 5cd8323801a1e8601c91708ea7a45aab84bc4a4f (diff) | |
download | crawl-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.cc | 5 |
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]; |