summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-25 03:05:05 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-25 03:05:05 +0000
commitef9621cf23810e12b8d3f77ba8de3538d4f02fc0 (patch)
tree2b29bdfb5a13711b63aee3fd5c371adad4ee7680 /crawl-ref/source/files.cc
parent516c6677528ba72ce7b07dba71cbda09840d0d03 (diff)
downloadcrawl-ref-ef9621cf23810e12b8d3f77ba8de3538d4f02fc0.tar.gz
crawl-ref-ef9621cf23810e12b8d3f77ba8de3538d4f02fc0.zip
[2455489] Fixing "dark" levels after crashes, due to the tile flavor being set after the level was saved. (This wasn't a problem until it started being saved recently.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7968 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc
index 7dad243f4b..b0b894c16b 100644
--- a/crawl-ref/source/files.cc
+++ b/crawl-ref/source/files.cc
@@ -1119,6 +1119,14 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
if (make_changes)
_do_lost_items(old_level_type);
+#ifdef USE_TILE
+ if (make_changes)
+ {
+ tiles.clear_minimap();
+ tiles.load_dungeon(NULL, you.pos().x, you.pos().y);
+ }
+#endif
+
// Try to open level savefile.
#ifdef DEBUG_LEVEL_LOAD
mprf(MSGCH_DIAGNOSTICS, "Try to open file %s", cha_fil.c_str());
@@ -1147,7 +1155,6 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
}
#ifdef USE_TILE
- tiles.load_dungeon(NULL, you.pos().x, you.pos().y);
tile_init_default_flavour();
tile_clear_flavour();
#endif
@@ -1240,6 +1247,11 @@ bool load( dungeon_feature_type stair_taken, load_mode_type load_mode,
place_transiting_items();
}
+#ifdef USE_TILE
+ if (make_changes)
+ TileNewLevel(just_created_level);
+#endif
+
_redraw_all();
_sanity_test_monster_inventory();