summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mstuff2.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 20:16:53 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-12 20:16:53 +0000
commit3dc7037033b072f2ed24e1479e04720ecff2b8b8 (patch)
treed801e58992991d8a06d402cffc553122903274d3 /crawl-ref/source/mstuff2.cc
parent009761f3ac94dc28c8d6c0d94395bda357944a1e (diff)
downloadcrawl-ref-3dc7037033b072f2ed24e1479e04720ecff2b8b8.tar.gz
crawl-ref-3dc7037033b072f2ed24e1479e04720ecff2b8b8.zip
Add explanatory comments to the pathfinding routines. I might have gone
overboard here :) - but I figured that it could be useful to occasionally explain *why* I implemented something a certain way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5767 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mstuff2.cc')
-rw-r--r--crawl-ref/source/mstuff2.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index b80db9bbba..75e48d46df 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -997,7 +997,8 @@ void monster_teleport(struct monsters *monster, bool instan, bool silent)
return;
}
- bool was_seen = player_monster_visible(monster) && mons_near(monster);
+ bool was_seen = player_monster_visible(monster) && mons_near(monster)
+ && monster->behaviour != BEH_LURK;
if (!silent)
simple_monster_message(monster, " disappears!");