summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-17 22:20:13 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-17 22:20:13 +0000
commit48b1b54aaf8c7ccc2b016158f58cf34385dd5068 (patch)
treed415f77648211e196b6f7d8f5075eaf6a1d411db /crawl-ref/source/travel.cc
parent78698f0432bba7bdac30f21a17a30c1cf88ae11b (diff)
downloadcrawl-ref-48b1b54aaf8c7ccc2b016158f58cf34385dd5068.tar.gz
crawl-ref-48b1b54aaf8c7ccc2b016158f58cf34385dd5068.zip
Fixed map marker crashes.
Reduced size of Pan demon bands summoned post-Orb (cbus). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2010 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 3ef549ec0e..9f6525ebbb 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -2488,9 +2488,16 @@ static int find_transtravel_stair( const level_id &cur,
static bool loadlev_populate_stair_distances(const level_pos &target)
{
+ // Copy the current crawl_environment. Note that this is a shallow
+ // copy so tmp holds references to map markers.
std::auto_ptr<crawl_environment> tmp(new crawl_environment(env));
+
+ // Clear markers. The tmp env still points at the markers, so we
+ // don't leak. XXX: Make crawl_environment fully assignable.
+ env.markers.clear();
+
if (!travel_load_map(target.id.branch,
- absdungeon_depth(target.id.branch, target.id.depth)))
+ absdungeon_depth(target.id.branch, target.id.depth)))
{
env = *tmp;
return false;