summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/exclude.cc
diff options
context:
space:
mode:
authorEnne Walker <enne.walker@gmail.com>2010-06-17 11:04:53 -0400
committerEnne Walker <enne.walker@gmail.com>2010-06-17 11:05:57 -0400
commiteb69bcc88fc9ad8500ab7dc71ecabb2dcfd7b441 (patch)
treeb6519330335a4f8be50ab22a33346cb1b19ee21b /crawl-ref/source/exclude.cc
parent29f9d8b3d0fb3fcaa195e6c8b42306749ae1b8cb (diff)
downloadcrawl-ref-eb69bcc88fc9ad8500ab7dc71ecabb2dcfd7b441.tar.gz
crawl-ref-eb69bcc88fc9ad8500ab7dc71ecabb2dcfd7b441.zip
[1749] Update minimap when clearing exclusions.
The minimap was being updated first, which did nothing because the cells were stil excluded at that point.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r--crawl-ref/source/exclude.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index d39de82ea2..9cfd691cae 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -409,15 +409,20 @@ void clear_excludes()
return;
#ifdef USE_TILE
- exclude_set::iterator it;
- //for (int i = curr_excludes.size()-1; i >= 0; i--)
- for (it = curr_excludes.begin(); it != curr_excludes.end(); ++it)
- _tile_exclude_gmap_update(it->second.pos);
+ // Tiles needs to update the minimap for each exclusion that is removed,
+ // but the exclusions need to be removed first. Therefore, make a copy
+ // of the current set of exclusions and iterate through the copy below.
+ exclude_set excludes = curr_excludes;
#endif
curr_excludes.clear();
clear_level_exclusion_annotation();
+#ifdef USE_TILE
+ for (exclude_set::iterator it = excludes.begin(); it != excludes.end(); ++it)
+ _tile_exclude_gmap_update(it->second.pos);
+#endif
+
_exclude_update();
}