summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/branch.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-01-01 05:02:09 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-01-03 04:45:59 +0100
commit405e9b68034c5e8793f6c169cbed7dd90d4ac8ba (patch)
tree792e3efe617bb42cfd8dadfb2c20947cad734e74 /crawl-ref/source/branch.cc
parent29969a4f936d3357f5f25971cbff31c026872a29 (diff)
downloadcrawl-ref-405e9b68034c5e8793f6c169cbed7dd90d4ac8ba.tar.gz
crawl-ref-405e9b68034c5e8793f6c169cbed7dd90d4ac8ba.zip
Use branch depth rather than absolute depth as the authoritative one.
Diffstat (limited to 'crawl-ref/source/branch.cc')
-rw-r--r--crawl-ref/source/branch.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc
index 99dea92117..7cac78d88b 100644
--- a/crawl-ref/source/branch.cc
+++ b/crawl-ref/source/branch.cc
@@ -19,21 +19,16 @@ const Branch& your_branch()
bool at_branch_bottom()
{
- return brdepth[you.where_are_you] == player_branch_depth();
+ return brdepth[you.where_are_you] == you.depth;
}
level_id branch_entry_level(branch_type branch)
{
// Hell and its subbranches need obnoxious special-casing:
if (branch == BRANCH_VESTIBULE_OF_HELL)
- {
- return level_id(you.hell_branch,
- subdungeon_depth(you.hell_branch, you.hell_exit));
- }
+ return level_id(you.hell_branch, you.hell_exit);
else if (is_hell_subbranch(branch))
- {
return level_id(BRANCH_VESTIBULE_OF_HELL, 1);
- }
const branch_type parent = branches[branch].parent_branch;
const int subdepth = startdepth[branch];