summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-27 22:13:06 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-27 22:13:06 +0000
commit498e7da04ff2c3bd22d0e160892c3c46b950a34e (patch)
tree2eabcc58fb7f6ec75f3e256761e143188a58669d /crawl-ref/source/files.cc
parent18c6841dbd2281ea14161c625e893afa469a090e (diff)
downloadcrawl-ref-498e7da04ff2c3bd22d0e160892c3c46b950a34e.tar.gz
crawl-ref-498e7da04ff2c3bd22d0e160892c3c46b950a34e.zip
Fix [2646326]: restore LOS properly after using the applicator functions
to visit a different level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9264 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index ecaa0c1abf..8f182126e0 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1075,7 +1075,7 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
}
you.prev_targ = MHITNOT;
- you.prev_grd_targ = coord_def(0, 0);
+ you.prev_grd_targ.reset();
// We clear twice - on save and on load.
// Once would be enough...
@@ -1391,7 +1391,7 @@ void _save_level(int level_saved, level_area_type old_ltype,
false );
you.prev_targ = MHITNOT;
- you.prev_grd_targ = coord_def(0, 0);
+ you.prev_grd_targ.reset();
FILE *saveFile = fopen(cha_fil.c_str(), "wb");
@@ -1719,6 +1719,9 @@ static void _restore_level(const level_id &original)
load( DNGN_STONE_STAIRS_DOWN_I, LOAD_VISITOR,
you.level_type, you.your_level, you.where_are_you );
+
+ // Rebuild the show grid, which was cleared out before.
+ calc_show_los();
}
// Given a level returns true if the level has been created already