summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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