summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-17 11:26:28 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-17 11:26:28 -0800
commit155946e89327f4a852aea98e00de172d021e2ada (patch)
treef45732d176ad0646a2f4502c5dba1889a13f1371 /crawl-ref/source/effects.cc
parent12fafd6bf07514de75f9fe00698b8e1493ac777c (diff)
downloadcrawl-ref-155946e89327f4a852aea98e00de172d021e2ada.tar.gz
crawl-ref-155946e89327f4a852aea98e00de172d021e2ada.zip
Alert tormented monsters even if attacker == NULL
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 08b62e4e00..c161837a6f 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -322,8 +322,8 @@ int torment_monsters(coord_def where, int pow, int caster, actor *attacker)
// because it can't kill them, and because hostile monsters use
// it. It does alert them, though.
// XXX: attacker isn't passed through "int torment()".
- if (attacker != NULL)
- behaviour_event(monster, ME_ALERT, attacker->mindex());
+ behaviour_event(monster, ME_ALERT,
+ attacker ? attacker->mindex() : MHITNOT);
}
monster->hurt(NULL, hploss, BEAM_TORMENT_DAMAGE);