summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index cbb42c5678..5f33f10c4d 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5705,9 +5705,12 @@ void player::teleport(bool now, bool abyss_shift)
void player::hurt(const actor *agent, int amount)
{
+ const monsters *mon = dynamic_cast<const monsters*>(agent);
if (agent->atype() == ACT_MONSTER)
- ouch(amount, monster_index( dynamic_cast<const monsters*>(agent) ),
- KILLED_BY_MONSTER);
+ {
+ ouch(amount, monster_index( mon ),
+ KILLED_BY_MONSTER, "", player_monster_visible(mon));
+ }
else
{
// Should never happen!