summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/exclude.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-05 16:34:43 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-01-05 16:41:37 +0100
commit465c2fbeb4a5dcc34b4b5d812cc904b80c941529 (patch)
tree8a37274c4a39cec024b2ab258fb5e44288f9a3b4 /crawl-ref/source/exclude.cc
parent638720017437843def8f94577cae7b4c5871ec61 (diff)
downloadcrawl-ref-465c2fbeb4a5dcc34b4b5d812cc904b80c941529.tar.gz
crawl-ref-465c2fbeb4a5dcc34b4b5d812cc904b80c941529.zip
Fix exclusions not being listed on the overmap screen.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r--crawl-ref/source/exclude.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index 5b78412b80..86d9b5c802 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -149,8 +149,10 @@ void travel_exclude::set_los()
bool travel_exclude::affects(const coord_def& p) const
{
if (!uptodate)
+ {
mprf(MSGCH_ERROR, "exclusion not up-to-date: e (%d,%d) p (%d,%d)",
pos.x, pos.y, p.x, p.y);
+ }
if (radius == 0)
return (p == pos);
else if (radius == 1)
@@ -219,10 +221,8 @@ void exclude_set::add_exclude_points(travel_exclude& ex)
ex.los.update();
for (radius_iterator ri(ex.pos, ex.radius, C_ROUND); ri; ++ri)
- {
if (ex.affects(*ri))
exclude_points.insert(*ri);
- }
}
void exclude_set::update_excluded_points()
@@ -367,7 +367,7 @@ static void _exclude_update()
LevelInfo &li = travel_cache.get_level_info(level_id::current());
li.update();
}
- set_level_exclusion_annotation(get_exclusion_desc());
+ set_level_exclusion_annotation(curr_excludes.get_exclusion_desc());
}
static void _exclude_update(const coord_def &p)
@@ -488,12 +488,12 @@ void maybe_remove_autoexclusion(const coord_def &p)
}
// Lists all exclusions on the current level.
-std::string get_exclusion_desc()
+std::string exclude_set::get_exclusion_desc()
{
std::vector<std::string> monsters;
int count_other = 0;
- exclude_set::iterator it;
- for (it = curr_excludes.begin(); it != curr_excludes.end(); ++it)
+ for (exclmap::iterator it = exclude_roots.begin();
+ it != exclude_roots.end(); ++it)
{
travel_exclude &ex = it->second;
if (!invalid_monster_type(ex.mon))