summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 9d11cdb4b9..7291a98c78 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -3022,7 +3022,18 @@ level_id level_id::current()
int level_id::absdepth() const
{
- return absdungeon_depth(branch, depth);
+ switch (level_type)
+ {
+ case LEVEL_DUNGEON:
+ return absdungeon_depth(branch, depth);
+ case LEVEL_PANDEMONIUM:
+ return 52;
+ case LEVEL_ABYSS:
+ return 51;
+ default:
+ // No true notion of depth here.
+ return you.your_level;
+ }
}
level_id level_id::get_next_level_id(const coord_def &pos)