diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 19:53:45 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 19:53:45 +0000 |
commit | 4c1860113f640efeb503505542393f3dccdd5060 (patch) | |
tree | e28485e52508608a7823fa389f2354b44d717a06 /crawl-ref/source/misc.cc | |
parent | 170c1de4d2bc1b996f11cffdec0fc49cfe71c388 (diff) | |
download | crawl-ref-4c1860113f640efeb503505542393f3dccdd5060.tar.gz crawl-ref-4c1860113f640efeb503505542393f3dccdd5060.zip |
Tweaked stash-tracker so that greedy explore works in Pandemonium.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@621 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 6235ebd1b6..56155c14e3 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -558,7 +558,7 @@ void up_stairs(void) && you.level_type != LEVEL_ABYSS && you.level_type != LEVEL_PANDEMONIUM; - level_id old_level_id = level_id::get_current_level_id(); + level_id old_level_id = level_id::current(); LevelInfo &old_level_info = travel_cache.get_level_info(old_level_id); int stair_x = you.x_pos, stair_y = you.y_pos; if (collect_travel_data) @@ -669,12 +669,12 @@ void up_stairs(void) mpr( "You sense a powerful magical force warping space.", MSGCH_WARN ); // Tell the travel code that we're now on a new level - travel_init_new_level(); + init_new_level(); if (collect_travel_data) { // Update stair information for the stairs we just ascended, and the // down stairs we're currently on. - level_id new_level_id = level_id::get_current_level_id(); + level_id new_level_id = level_id::current(); if (you.level_type != LEVEL_PANDEMONIUM && you.level_type != LEVEL_ABYSS && @@ -821,7 +821,7 @@ void down_stairs( bool remove_stairs, int old_level, bool force ) && you.level_type != LEVEL_ABYSS && you.level_type != LEVEL_PANDEMONIUM; - level_id old_level_id = level_id::get_current_level_id(); + level_id old_level_id = level_id::current(); LevelInfo &old_level_info = travel_cache.get_level_info(old_level_id); int stair_x = you.x_pos, stair_y = you.y_pos; if (collect_travel_data) @@ -1109,12 +1109,12 @@ void down_stairs( bool remove_stairs, int old_level, bool force ) if (you.skills[SK_TRANSLOCATIONS] > 0 && !allow_control_teleport( true )) mpr( "You sense a powerful magical force warping space.", MSGCH_WARN ); - travel_init_new_level(); + init_new_level(); if (collect_travel_data) { // Update stair information for the stairs we just descended, and the // upstairs we're currently on. - level_id new_level_id = level_id::get_current_level_id(); + level_id new_level_id = level_id::current(); if (you.level_type != LEVEL_PANDEMONIUM && you.level_type != LEVEL_ABYSS && @@ -1143,6 +1143,12 @@ void down_stairs( bool remove_stairs, int old_level, bool force ) } } // end down_stairs() +void init_new_level() +{ + travel_init_new_level(); + stash_init_new_level(); +} + void new_level(void) { int curr_subdungeon_level = you.your_level + 1; |