summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pathfind.h
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2014-02-25 05:07:00 -0330
committerDracoOmega <draco_omega@live.com>2014-02-25 05:22:10 -0330
commita15dc20ff3689b5046f2bde9cf7cb2ccd10af172 (patch)
tree0ccba8b2bf9892f55a1bffa7866ebfc3234505b7 /crawl-ref/source/mon-pathfind.h
parentfd33211bd3db09b14bf07fa225ad75c93a8a318f (diff)
downloadcrawl-ref-a15dc20ff3689b5046f2bde9cf7cb2ccd10af172.tar.gz
crawl-ref-a15dc20ff3689b5046f2bde9cf7cb2ccd10af172.zip
Make friendly summons prefer paths that never leave the player's sight
Sometimes the shortest path that a monster could see to its target would follow a route the player themselves couldn't see, which would cause them to oscillate back and forth at the edge of sight, moving away and then immediately returning once they left your view. Now they should elect to take longer paths that they can actually follow.
Diffstat (limited to 'crawl-ref/source/mon-pathfind.h')
-rw-r--r--crawl-ref/source/mon-pathfind.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-pathfind.h b/crawl-ref/source/mon-pathfind.h
index d1a8c3807a..1be95afd67 100644
--- a/crawl-ref/source/mon-pathfind.h
+++ b/crawl-ref/source/mon-pathfind.h
@@ -49,6 +49,10 @@ protected:
// (Used for player estimates of whether a monster can travel somewhere.)
bool traverse_unmapped;
+ // Only follow paths that do not leave the player's sight (used for
+ // friendly summoned monster which are not already out of sight)
+ bool traverse_in_sight;
+
// Maximum range to search between start and target. None, if zero.
int range;