diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-31 08:16:07 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-31 16:57:54 +0100 |
commit | a57962fa1975ecc27863c2f847fa2a1c4484f7fa (patch) | |
tree | 7e5055301b3554b4598be94b52b65633fea156dc /crawl-ref/source/wiz-item.cc | |
parent | b5aec581b1ad18e6eefb77947e822c089f778d6f (diff) | |
download | crawl-ref-a57962fa1975ecc27863c2f847fa2a1c4484f7fa.tar.gz crawl-ref-a57962fa1975ecc27863c2f847fa2a1c4484f7fa.zip |
monster_near_iterator
Does the "in view" part of functionality of monster_iterator, is simpler,
allows using los models other than LOS_DEFAULT, and gets rid of a lot of
uses of get_los().
The code is nearly identical as actor_near_iterator, but the old delegation
used more code than either of those. Still, perhaps templating could work?
This commit also fixes a buttload of ignoring invis / see invis / sense invis
(ie, visible_to()) and act-through-glass bugs.
Diffstat (limited to 'crawl-ref/source/wiz-item.cc')
-rw-r--r-- | crawl-ref/source/wiz-item.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/wiz-item.cc b/crawl-ref/source/wiz-item.cc index 1ed591c2a8..40c798a67d 100644 --- a/crawl-ref/source/wiz-item.cc +++ b/crawl-ref/source/wiz-item.cc @@ -10,6 +10,7 @@ #include <errno.h> #include "acquire.h" +#include "act-iter.h" #include "art-enum.h" #include "artefact.h" #include "coordit.h" @@ -30,7 +31,6 @@ #include "misc.h" #include "mon-iter.h" #include "mon-stuff.h" -#include "mon-util.h" #include "options.h" #include "output.h" #include "player-equip.h" @@ -798,7 +798,7 @@ void wizard_unidentify_pack() // Forget things that nearby monsters are carrying, as well. // (For use with the "give monster an item" wizard targetting // command.) - for (monster_iterator mon(you.get_los()); mon; ++mon) + for (monster_near_iterator mon(&you); mon; ++mon) { for (int j = 0; j < NUM_MONSTER_SLOTS; ++j) { |