summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-23 03:27:38 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-23 03:27:38 +0000
commit59b4a255cc8e70e77b2374a36f7555d6b59ff06d (patch)
tree8dd3cece613cd54642241ce64bca1bc19f21d255 /crawl-ref/source
parent5a9bc366df060d4ff78181ebd1a51eec27dc3577 (diff)
downloadcrawl-ref-59b4a255cc8e70e77b2374a36f7555d6b59ff06d.tar.gz
crawl-ref-59b4a255cc8e70e77b2374a36f7555d6b59ff06d.zip
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
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/delay.cc2
-rw-r--r--crawl-ref/source/monstuff.cc5
-rw-r--r--crawl-ref/source/view.cc2
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<monsters*>(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