diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-19 07:53:07 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-19 07:53:07 +0000 |
commit | b353902c5b7312fbd2f7d4959ea5c6971bc6db74 (patch) | |
tree | f4b86440ca85c749433d474de94b0f218a83faa4 /crawl-ref/source/item_use.cc | |
parent | 94328e825e21105c225a85de384f7276c6ded547 (diff) | |
download | crawl-ref-b353902c5b7312fbd2f7d4959ea5c6971bc6db74.tar.gz crawl-ref-b353902c5b7312fbd2f7d4959ea5c6971bc6db74.zip |
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
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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<monsters*>(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); |