diff options
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index efbe9c3455..260cc4b573 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -2551,6 +2551,12 @@ std::vector<coord_def> monster_pathfind::calc_waypoints() } } + // Add the actual target to the list of waypoints, so we can later check + // whether a tracked enemy has moved too much, and we have to update the + // path. + if (pos != path[path.size() - 1]) + waypoints.push_back(pos); + return waypoints; } |