summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-behv.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2014-02-25 05:09:10 -0330
committerDracoOmega <draco_omega@live.com>2014-02-25 05:22:12 -0330
commitb859c480c2e92fa42d481166c99477d15f9e48b9 (patch)
treee19bfd954aaca6f789f3a2c7840d8eb18fc8e099 /crawl-ref/source/mon-behv.cc
parenta15dc20ff3689b5046f2bde9cf7cb2ccd10af172 (diff)
downloadcrawl-ref-b859c480c2e92fa42d481166c99477d15f9e48b9.tar.gz
crawl-ref-b859c480c2e92fa42d481166c99477d15f9e48b9.zip
Improve/fix some ally movement behavior via pathfinding
This should fix them sometimes inexplicably attempting to walk into walls, and hopefully improve their movement in a number of other situations where you have a clear view of their target, but they don't.
Diffstat (limited to 'crawl-ref/source/mon-behv.cc')
-rw-r--r--crawl-ref/source/mon-behv.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-behv.cc b/crawl-ref/source/mon-behv.cc
index 383e242c16..fda0306657 100644
--- a/crawl-ref/source/mon-behv.cc
+++ b/crawl-ref/source/mon-behv.cc
@@ -704,7 +704,7 @@ void handle_behaviour(monster* mon)
// our target, even if this monster cannot (we'll assume
// the player passes along this information to allies)
else if (!foepos.origin() && you.see_cell(foepos))
- mon->target = foepos;
+ try_pathfind(mon);
else
{
new_foe = MHITYOU;