diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2013-04-17 11:51:37 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2013-04-20 19:01:01 +0200 |
commit | ca85252ff6aafaefae00950bd48be14abc784356 (patch) | |
tree | 157a0cef42a7325e4250895f1b498917fd6c239a /crawl-ref/source/spl-other.cc | |
parent | f36a11aeb757c72c7b1c095ec6d14c9e783613bd (diff) | |
download | crawl-ref-ca85252ff6aafaefae00950bd48be14abc784356.tar.gz crawl-ref-ca85252ff6aafaefae00950bd48be14abc784356.zip |
Unify the checks for monster and player recall to avoid code duplication.
Diffstat (limited to 'crawl-ref/source/spl-other.cc')
-rw-r--r-- | crawl-ref/source/spl-other.cc | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/crawl-ref/source/spl-other.cc b/crawl-ref/source/spl-other.cc index 1fb5408d6d..b40aa3658e 100644 --- a/crawl-ref/source/spl-other.cc +++ b/crawl-ref/source/spl-other.cc @@ -192,19 +192,7 @@ void start_recall(int type) you.recall_list.clear(); for (monster_iterator mi; mi; ++mi) { - if (mi->type == MONS_NO_MONSTER) - continue; - - if (!mi->friendly()) - continue; - - if (mons_class_is_stationary(mi->type) - || mons_is_conjured(mi->type)) - { - continue; - } - - if (!monster_habitable_grid(*mi, DNGN_FLOOR)) + if (!mons_is_recallable(&you, *mi)) continue; if (type == 1) // undead |