From 4c1860113f640efeb503505542393f3dccdd5060 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 12 Dec 2006 19:53:45 +0000 Subject: 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 --- crawl-ref/source/misc.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/misc.cc') 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; -- cgit v1.2.3-54-g00ecf