diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-16 17:05:25 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-16 17:05:25 +0100 |
commit | 6c4f67eba0c2778283f9fa76fbe1f03692de8206 (patch) | |
tree | 327df7f3bcfbf20236cc4e95291dc4a05ffd0243 /crawl-ref/source/files.cc | |
parent | 6d24305edda4d359c8f7cf6d617d32da19e4bf59 (diff) | |
download | crawl-ref-6c4f67eba0c2778283f9fa76fbe1f03692de8206.tar.gz crawl-ref-6c4f67eba0c2778283f9fa76fbe1f03692de8206.zip |
Fix missing Hell, Abyss and Pan entries as well.
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 75823cb7eb..adf990c5f4 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -920,9 +920,6 @@ static void _place_player_on_stair(branch_type old_branch, #if TAG_MAJOR_VERSION == 34 static void _ensure_entry(branch_type br) { - if (brentry[br] != level_id::current()) - return; - dungeon_feature_type entry = branches[br].entry_stairs; for (rectangle_iterator ri(1); ri; ++ri) if (grd(*ri) == entry) @@ -948,9 +945,19 @@ static void _ensure_entry(branch_type br) static void _add_missing_branches() { + const level_id lc = level_id::current(); + // Could do all just in case, but this seems safer: - _ensure_entry(BRANCH_VAULTS); - _ensure_entry(BRANCH_ZOT); + if (brentry[BRANCH_VAULTS] == lc) + _ensure_entry(BRANCH_VAULTS); + if (brentry[BRANCH_ZOT] == lc) + _ensure_entry(BRANCH_ZOT); + if (lc == level_id(BRANCH_DEPTHS, 2) || lc == level_id(BRANCH_DUNGEON, 21)) + _ensure_entry(BRANCH_VESTIBULE); + if (lc == level_id(BRANCH_DEPTHS, 3) || lc == level_id(BRANCH_DUNGEON, 24)) + _ensure_entry(BRANCH_PANDEMONIUM); + if (lc == level_id(BRANCH_DEPTHS, 4) || lc == level_id(BRANCH_DUNGEON, 25)) + _ensure_entry(BRANCH_ABYSS); } #endif |