diff options
author | DracoOmega <draco_omega@live.com> | 2013-07-03 21:28:01 -0230 |
---|---|---|
committer | DracoOmega <draco_omega@live.com> | 2013-07-04 00:05:46 -0230 |
commit | 218fa2e2c932f5cf8ae8ed36306213f3109cf6cd (patch) | |
tree | 0b45fdc6f60da868c96d33391f9ed3ee54c32620 /crawl-ref/source/mon-pathfind.cc | |
parent | d7fce62bf7797f788b5d33d5ee5a9be7ca4fff6d (diff) | |
download | crawl-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.cc | 3 |
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; } |