From 59b4a255cc8e70e77b2374a36f7555d6b59ff06d Mon Sep 17 00:00:00 2001 From: zelgadis Date: Fri, 23 Jan 2009 03:27:38 +0000 Subject: Force monster movement to keep the monster in LOS immediately after the monster gives a "comes into view" message, not immediately after it shouts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8705 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/delay.cc | 2 ++ crawl-ref/source/monstuff.cc | 5 ++--- crawl-ref/source/view.cc | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 9f76609cc0..bc99032034 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1782,6 +1782,7 @@ inline static bool _monster_warning(activity_interrupt_type ai, } else { + ASSERT(mon->seen_context != "just seen"); // If the monster is in the auto_exclude list, automatically // set an exclusion. if (need_auto_exclude(mon) && !is_exclude_root(mon->pos())) @@ -1842,6 +1843,7 @@ inline static bool _monster_warning(activity_interrupt_type ai, print_formatted_paragraph(text, get_number_of_cols(), MSGCH_WARN); + const_cast(mon)->seen_context = "just seen"; } if (Options.tutorial_left) diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 580bec1dcf..7b610c54dd 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -4777,8 +4777,8 @@ static void _handle_movement(monsters *monster) if (crawl_state.arena) return; - // Did we just shout? - if (monster->seen_context != "just shouted") + // Did we just come into view? + if (monster->seen_context != "just seen") return; monster->seen_context.clear(); @@ -8810,7 +8810,6 @@ void seen_monster(monsters *monster) // Monster was viewed this turn monster->flags |= MF_WAS_IN_VIEW; - monster->seen_context.clear(); if (monster->flags & MF_SEEN) return; diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 376017b82b..d155f10004 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -1196,8 +1196,6 @@ void handle_monster_shouts(monsters* monster, bool force) const int noise_level = get_shout_noise_level(s_type); if (noise_level > 0) noisy(noise_level, monster->pos()); - - monster->seen_context = "just shouted"; } #ifdef WIZARD -- cgit v1.2.3-54-g00ecf