summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-05 12:57:13 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-05 12:57:13 -0600
commit51ded013829b4cd8f73fa7f6313e73d2f7550aa5 (patch)
tree58a2f3973efdd6fb016f3ab7a3a71809d0d888d0 /crawl-ref/source/mon-act.cc
parent418a2664a3de915971c847d9fb16e93bc263661e (diff)
downloadcrawl-ref-51ded013829b4cd8f73fa7f6313e73d2f7550aa5.tar.gz
crawl-ref-51ded013829b4cd8f73fa7f6313e73d2f7550aa5.zip
Make many checks for monster (non)existence on squares use monster_at().
Not all are changed yet, as there are several index checks still needed for debugging purposes. Also, make many checks for player/monster (non)existence use actor_at().
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 2ad17e09a2..ffa34a4804 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -534,7 +534,7 @@ static void _handle_movement(monsters *monster)
// First, check whether the monster is smart enough to even consider
// this.
if ((newpos == you.pos()
- || mgrd(newpos) != NON_MONSTER && monster->foe == mgrd(newpos))
+ || monster_at(newpos) && monster->foe == mgrd(newpos))
&& mons_intel(monster) >= I_ANIMAL
&& coinflip()
&& !mons_is_confused(monster) && !mons_is_caught(monster)