summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pathfind.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-07-03 21:28:01 -0230
committerDracoOmega <draco_omega@live.com>2013-07-04 00:05:46 -0230
commit218fa2e2c932f5cf8ae8ed36306213f3109cf6cd (patch)
tree0b45fdc6f60da868c96d33391f9ed3ee54c32620 /crawl-ref/source/mon-pathfind.cc
parentd7fce62bf7797f788b5d33d5ee5a9be7ca4fff6d (diff)
downloadcrawl-ref-218fa2e2c932f5cf8ae8ed36306213f3109cf6cd.tar.gz
crawl-ref-218fa2e2c932f5cf8ae8ed36306213f3109cf6cd.zip
Allow rock worms and dryads to pathfind through their native terrain
Pathfinding was vetoing all solid squares before it ever bothered to ask the monster if they could walk through them.
Diffstat (limited to 'crawl-ref/source/mon-pathfind.cc')
-rw-r--r--crawl-ref/source/mon-pathfind.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-pathfind.cc b/crawl-ref/source/mon-pathfind.cc
index a2acded317..1b16850a61 100644
--- a/crawl-ref/source/mon-pathfind.cc
+++ b/crawl-ref/source/mon-pathfind.cc
@@ -423,7 +423,8 @@ bool monster_pathfind::traversable(const coord_def& p)
{
return true;
}
- else
+ // Give wall-walkers a chance to see if this grid is compatible with them
+ else if (!mons || !mons_wall_shielded(mons) || actor_at(p))
return false;
}