diff options
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 90efb07d3b..25bff52498 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2669,10 +2669,6 @@ void behaviour_event(monsters *mon, mon_event_type event, int src, break; } - // If it woke up, it might shout. - if (was_sleeping && !mons_is_sleeping(mon) && allow_shout) - handle_monster_shouts(mon); - if (setTarget) { if (src == MHITYOU) @@ -2694,6 +2690,10 @@ void behaviour_event(monsters *mon, mon_event_type event, int src, _handle_behaviour(mon); ASSERT(in_bounds(mon->target) || mon->target.origin()); + // If it woke up, it might shout. + if (was_sleeping && !mons_is_sleeping(mon) && allow_shout) + handle_monster_shouts(mon); + const bool wasLurking = (old_behaviour == BEH_LURK && !mons_is_lurking(mon)); const bool isPacified = mons_is_pacified(mon); @@ -3833,7 +3833,6 @@ static void _handle_behaviour(monsters *mon) const dungeon_feature_type can_move = (mons_amphibious(mon)) ? DNGN_DEEP_WATER : DNGN_SHALLOW_WATER; - // Validate current target exists. if (mon->foe != MHITNOT && mon->foe != MHITYOU) { |