From b353902c5b7312fbd2f7d4959ea5c6971bc6db74 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 19 Jan 2009 07:53:07 +0000 Subject: Take advantage of check_redraw() generating an AI_SEE_MONSTER interrupt when appropriate, and fix dispersal ammo's usage of apply_location_effects() and check_redraw(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8582 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 6881c556d0..15415b9467 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1898,11 +1898,13 @@ static bool _dispersal_hit_victim(bolt& beam, actor* victim, int dmg, { monsters *mon = dynamic_cast(victim); + if (!(mon->flags & MF_WAS_IN_VIEW)) + mon->seen_context = "thin air"; + mons_clear_trapping_net(mon); - mon->check_redraw(oldpos); mon->move_to_pos(pos); - mon->apply_location_effects(pos); - mon->check_redraw(pos); + mon->apply_location_effects(oldpos); + mon->check_redraw(oldpos); const bool seen = you.can_see(mon); const std::string name = mon->name(DESC_CAP_THE); @@ -1910,8 +1912,6 @@ static bool _dispersal_hit_victim(bolt& beam, actor* victim, int dmg, mprf("%s blinks!", name.c_str()); else if (was_seen && !seen) mprf("%s vanishes!", name.c_str()); - else if (!was_seen && seen) - mprf("%s appears from out of thin air!", name.c_str()); } return (true); -- cgit v1.2.3-54-g00ecf