summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/files.cc3
-rw-r--r--crawl-ref/source/misc.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 17aa7aaece..691840293a 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1737,6 +1737,7 @@ bool apply_to_level(const level_id &level, bool preserve_current,
bool apply_to_all_dungeons(bool (*applicator)())
{
const level_id original = level_id::current();
+ const int your_old_level = you.your_level;
// Apply to current level, then save it out.
bool success = applicator();
@@ -1760,6 +1761,8 @@ bool apply_to_all_dungeons(bool (*applicator)())
}
_restore_level(original);
+ if (you.level_type != LEVEL_DUNGEON)
+ you.your_level = your_old_level;
return (success);
}
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 3906b0646d..bcfa786c16 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1563,7 +1563,7 @@ static void _player_change_level_reset()
if (you.pet_target != MHITYOU)
you.pet_target = MHITNOT;
- you.prev_grd_targ = coord_def(0, 0);
+ you.prev_grd_targ.reset();
}
static level_id _stair_destination_override()