diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-04-26 23:15:01 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-04-26 23:48:28 +0200 |
commit | f37330d6d0759f6d0264837b1904ec383d893201 (patch) | |
tree | c54e48ed59e7f7d6e7f82e75214605787de5592c /crawl-ref/source/place.cc | |
parent | 3772862b07e3a9a84255f3fb0420d8c4c14cc924 (diff) | |
download | crawl-ref-f37330d6d0759f6d0264837b1904ec383d893201.tar.gz crawl-ref-f37330d6d0759f6d0264837b1904ec383d893201.zip |
Give branches explicit base absdepth, instead of using distance to D:1.
Diffstat (limited to 'crawl-ref/source/place.cc')
-rw-r--r-- | crawl-ref/source/place.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crawl-ref/source/place.cc b/crawl-ref/source/place.cc index 6e5567336a..6c8bb34019 100644 --- a/crawl-ref/source/place.cc +++ b/crawl-ref/source/place.cc @@ -98,13 +98,7 @@ std::string prep_branch_level_name() int absdungeon_depth(branch_type branch, int subdepth) { - --subdepth; - while (branch != NUM_BRANCHES) - { - subdepth += (branches[branch].mindepth + branches[branch].maxdepth) / 2; - branch = branches[branch].parent_branch; - } - return subdepth; + return branches[branch].absdepth + subdepth - 1; } bool branch_allows_followers(branch_type branch) |