summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 07:35:43 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 07:35:43 +0000
commitacd89a148d572cedafcf498496df2d3ce42a6980 (patch)
tree01d8279f0f1aaf88eb202cf2a40c833cab46c878 /crawl-ref/source/effects.cc
parentc9d385badbb85a615bf748908eabca4e10268341 (diff)
downloadcrawl-ref-acd89a148d572cedafcf498496df2d3ce42a6980.tar.gz
crawl-ref-acd89a148d572cedafcf498496df2d3ce42a6980.zip
When tormenting a monster, alert it to the actual sorce of the torment, rather
than assuming the player is always the source. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9587 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index d236f38719..241a1e909f 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -277,7 +277,8 @@ int torment_monsters(coord_def where, int pow, int caster, actor *attacker)
// Currently, torment doesn't annoy the monsters it affects
// because it can't kill them, and because hostile monsters use
// it. It does alert them, though.
- behaviour_event(monster, ME_ALERT, MHITYOU);
+ if (attacker != NULL)
+ behaviour_event(monster, ME_ALERT, attacker->mindex());
}
monster->hurt(NULL, hploss, BEAM_TORMENT_DAMAGE);