diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-07-16 12:20:03 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-07-16 16:07:03 +0200 |
commit | ed3b67e99287a591f4501d4d82362d4bc81e16c1 (patch) | |
tree | a56517a790bd0b7b9bf2a1445514f79b890521c7 /crawl-ref/source/areas.cc | |
parent | c8a444dcd674a50f8c0b94eea23ac999175167a7 (diff) | |
download | crawl-ref-ed3b67e99287a591f4501d4d82362d4bc81e16c1.tar.gz crawl-ref-ed3b67e99287a591f4501d4d82362d4bc81e16c1.zip |
Axe two uses of los_glob.
They hinder attempts of untangling the iterator/los mess.
Diffstat (limited to 'crawl-ref/source/areas.cc')
-rw-r--r-- | crawl-ref/source/areas.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/crawl-ref/source/areas.cc b/crawl-ref/source/areas.cc index a78000fd6b..8b0b4ea7f8 100644 --- a/crawl-ref/source/areas.cc +++ b/crawl-ref/source/areas.cc @@ -17,6 +17,7 @@ #include "env.h" #include "fprop.h" #include "libutil.h" +#include "losglobal.h" #include "mon-behv.h" #include "mon-iter.h" #include "mon-stuff.h" @@ -217,10 +218,11 @@ static void _update_agrid() { const int r = 5; _agrid_centres.push_back(area_centre(AREA_QUAD, you.pos(), r)); - for (radius_iterator ri(you.pos(), r, C_CIRCLE, you.get_los()); + for (radius_iterator ri(you.pos(), r, C_CIRCLE); ri; ++ri) { - _set_agrid_flag(*ri, APROP_QUAD); + if (cell_see_cell(you.pos(), *ri, LOS_DEFAULT)) + _set_agrid_flag(*ri, APROP_QUAD); } no_areas = false; } @@ -229,10 +231,11 @@ static void _update_agrid() { const int r = 27; _agrid_centres.push_back(area_centre(AREA_DISJUNCTION, you.pos(), r)); - for (radius_iterator ri(you.pos(), r, C_CIRCLE, you.get_los()); + for (radius_iterator ri(you.pos(), r, C_CIRCLE); ri; ++ri) { - _set_agrid_flag(*ri, APROP_DISJUNCTION); + if (cell_see_cell(you.pos(), *ri, LOS_DEFAULT)) + _set_agrid_flag(*ri, APROP_DISJUNCTION); } no_areas = false; } |