summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/main.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-12-02 05:43:30 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-12-02 05:44:17 -0800
commita2c9f19f6f64a781722ca602c393731d456cf3b3 (patch)
treef53b33daecd00017e3355fde0cc564c21aa282f4 /crawl-ref/source/main.cc
parent9a0d6db186259aae900f30afb26322640487e97d (diff)
downloadcrawl-ref-a2c9f19f6f64a781722ca602c393731d456cf3b3.tar.gz
crawl-ref-a2c9f19f6f64a781722ca602c393731d456cf3b3.zip
Fix mesmerisation being broken too soon
Diffstat (limited to 'crawl-ref/source/main.cc')
-rw-r--r--crawl-ref/source/main.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 09dc7b5f41..805cd2b9a3 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -3776,6 +3776,12 @@ static bool _initialise(void)
newc ? LOAD_START_GAME : LOAD_RESTART_GAME,
NUM_LEVEL_AREA_TYPES, -1, you.where_are_you);
+ // Make sure monsters have a valid LOS before the first turn starts.
+ // This prevents mesmerization from being broken when a game is
+ // restored.
+ for (monster_iterator mi; mi; ++mi)
+ mi->update_los();
+
if (newc && you.char_direction == GDT_GAME_START)
{
// Randomise colours properly for the Abyss.