summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ouch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r--crawl-ref/source/ouch.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc
index 6fb5819f63..06e68a04ae 100644
--- a/crawl-ref/source/ouch.cc
+++ b/crawl-ref/source/ouch.cc
@@ -1094,3 +1094,13 @@ void end_game( scorefile_entry &se )
get_ch();
end(0);
}
+
+int actor_to_death_source(const actor* agent)
+{
+ if (agent->atype() == ACT_PLAYER)
+ return (NON_MONSTER);
+ else if (agent->atype() == ACT_MONSTER)
+ return (dynamic_cast<const monsters*>(agent)->mindex());
+ else
+ return (NON_MONSTER);
+}