summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/exclude.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-06-06 20:36:03 +0200
committerRobert Vollmert <rvollmert@gmx.net>2010-06-06 21:54:09 +0200
commit838c032ad875a603daa750876c524df4379e84d6 (patch)
treec4aa61e4a9c2f2e8c3a23924cf98b9abda32a2bc /crawl-ref/source/exclude.cc
parentd3c0f46bf1bcdd92efc0c5eb893c143e418df126 (diff)
downloadcrawl-ref-838c032ad875a603daa750876c524df4379e84d6.tar.gz
crawl-ref-838c032ad875a603daa750876c524df4379e84d6.zip
Keep travel cache up-to-date for current level everywhere.
Previously, it wasn't for non-dungeon levels, leading to various strangenesses like exclusions in Pan not surviving save+reload or viewing other levels, or presumably any level excursions caused e.g. by piety changes. Now the current level's LevelInfo is updated unconditionally, but not written to disk when taking stairs. The travel cache save/restore code writes out all levels in the cache, but complains if it reads back info about non-current non-dungeon levels. Fixes issue #1519.
Diffstat (limited to 'crawl-ref/source/exclude.cc')
-rw-r--r--crawl-ref/source/exclude.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/crawl-ref/source/exclude.cc b/crawl-ref/source/exclude.cc
index e5a3044594..d38ded17b3 100644
--- a/crawl-ref/source/exclude.cc
+++ b/crawl-ref/source/exclude.cc
@@ -378,11 +378,8 @@ static void _tile_exclude_gmap_update(const coord_def &p)
static void _exclude_update()
{
- if (can_travel_interlevel())
- {
- LevelInfo &li = travel_cache.get_level_info(level_id::current());
- li.update();
- }
+ LevelInfo &li = travel_cache.get_level_info(level_id::current());
+ li.update();
set_level_exclusion_annotation(curr_excludes.get_exclusion_desc());
}