summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ranged_attack.cc
diff options
context:
space:
mode:
authorShmuale Mark <shm.mark@gmail.com>2014-05-04 01:58:36 -0400
committerShmuale Mark <shm.mark@gmail.com>2014-05-04 01:58:36 -0400
commit9c81f37786b5cf086cfd98148550d2f599385c9a (patch)
tree8107870fdd5d43857378b562639fb646058b9ca7 /crawl-ref/source/ranged_attack.cc
parent3fb529acba3155515529cdd09a597d1226a44415 (diff)
downloadcrawl-ref-9c81f37786b5cf086cfd98148550d2f599385c9a.tar.gz
crawl-ref-9c81f37786b5cf086cfd98148550d2f599385c9a.zip
Fix a crash on hitting yourself with a dart of dispersal (Grunt).
Possibly it shouldn't let you blink either, but that's for another time.
Diffstat (limited to 'crawl-ref/source/ranged_attack.cc')
-rw-r--r--crawl-ref/source/ranged_attack.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/ranged_attack.cc b/crawl-ref/source/ranged_attack.cc
index de7bdc14e2..655a055c58 100644
--- a/crawl-ref/source/ranged_attack.cc
+++ b/crawl-ref/source/ranged_attack.cc
@@ -311,7 +311,7 @@ bool ranged_attack::handle_phase_hit()
}
// XXX: unify this with melee_attack's code
- if (attacker->is_player())
+ if (attacker->is_player() && defender->is_monster())
{
behaviour_event(defender->as_monster(), ME_WHACK, attacker,
coord_def(), !stab_attempt);