diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2010-09-09 09:22:12 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2010-09-09 09:22:12 +0200 |
commit | 9211dd31d286da7338d75d6e333f94abb3766cbb (patch) | |
tree | 065b70f2dbc458e50b15a3666cbd391498192082 /crawl-ref/source/exclude.cc | |
parent | 73021641df50763199be34d841e917efa2393ec9 (diff) | |
download | crawl-ref-9211dd31d286da7338d75d6e333f94abb3766cbb.tar.gz crawl-ref-9211dd31d286da7338d75d6e333f94abb3766cbb.zip |
Fix exclusion LOS not being updated properly. (#2513)
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r-- | crawl-ref/source/exclude.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc index aba655c0cb..4be28bd505 100644 --- a/crawl-ref/source/exclude.cc +++ b/crawl-ref/source/exclude.cc @@ -238,14 +238,14 @@ void exclude_set::add_exclude_points(travel_exclude& ex) exclude_points.insert(*ri); } -void exclude_set::update_excluded_points() +void exclude_set::update_excluded_points(bool recompute_los) { for (iterator it = exclude_roots.begin(); it != exclude_roots.end(); ++it) { travel_exclude &ex = it->second; if (!ex.uptodate) { - recompute_excluded_points(); + recompute_excluded_points(recompute_los); return; } } @@ -321,7 +321,7 @@ static void _mark_excludes_non_updated(const coord_def &p) it != curr_excludes.end(); ++it) { travel_exclude &ex = it->second; - ex.uptodate = ex.uptodate && ex.in_bounds(p); + ex.uptodate = ex.uptodate && !ex.in_bounds(p); } } @@ -344,7 +344,7 @@ void update_exclusion_los(std::vector<coord_def> changed) for (unsigned int i = 0; i < changed.size(); ++i) _mark_excludes_non_updated(changed[i]); - curr_excludes.update_excluded_points(); + curr_excludes.update_excluded_points(true); } bool is_excluded(const coord_def &p, const exclude_set &exc) |