diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-13 21:59:47 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-13 22:51:35 +0100 |
commit | d958695281c7c79be672abda7cdaf673c27514e6 (patch) | |
tree | e7d88894f39703160b6b3bfa3c5599d1dd3f9a76 /crawl-ref/source/xom.cc | |
parent | 2021591fae6918624a49d21849ebd2ca35ff9ff2 (diff) | |
download | crawl-ref-d958695281c7c79be672abda7cdaf673c27514e6.tar.gz crawl-ref-d958695281c7c79be672abda7cdaf673c27514e6.zip |
Convert a bunch of coordinate loops to new radius_iterator.
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index f7a694d840..f16e188872 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -1975,11 +1975,8 @@ static int _xom_throw_divine_lightning(bool debug = false) static int _xom_change_scenery(bool debug = false) { std::vector<coord_def> candidates; - for (radius_iterator ri(you.pos(), LOS_RADIUS, false, true); ri; ++ri) + for (radius_iterator ri(&you.get_los()); ri; ++ri) { - if (!in_bounds(*ri) || !you.see_cell(*ri)) - continue; - dungeon_feature_type feat = grd(*ri); if (feat >= DNGN_FOUNTAIN_BLUE && feat <= DNGN_DRY_FOUNTAIN_BLOOD) candidates.push_back(*ri); @@ -2281,7 +2278,7 @@ static void _get_in_view(FixedVector<bool, NUM_FEATURES>& in_view) { in_view.init(false); - for (radius_iterator ri(you.pos(), LOS_RADIUS); ri; ++ri) + for (radius_iterator ri(&you.get_los()); ri; ++ri) in_view[grd(*ri)] = true; } @@ -3036,7 +3033,7 @@ static int _xom_repel_stairs(bool debug = false) std::vector<coord_def> stairs_avail; bool real_stairs = false; - for (radius_iterator ri(you.pos(), LOS_RADIUS, false, true); ri; ++ri) + for (radius_iterator ri(&you.get_los()); ri; ++ri) { dungeon_feature_type feat = grd(*ri); if (feat_stair_direction(feat) != CMD_NO_CMD |