summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 10:11:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-09 10:11:14 +0000
commit1052e0b0eb86f0c2858c07b1db83fc12c0fbffab (patch)
tree72b617a7be2958f43ccfb192d2d611ff0d5db9d5 /crawl-ref/source/spells3.cc
parentba15bdad80f10dc07f829c14fa6557652caa083f (diff)
downloadcrawl-ref-1052e0b0eb86f0c2858c07b1db83fc12c0fbffab.tar.gz
crawl-ref-1052e0b0eb86f0c2858c07b1db83fc12c0fbffab.zip
When trying to animate single undead, only count instances of remains
instead of all items, so that the "no remains/skeleton here" message is properly displayed when there are items on the floor but no remains. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9395 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index dd8736e367..304a138af3 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -883,7 +883,9 @@ int animate_remains(const coord_def &a, corpse_type class_allowed,
// Search all the items on the ground for a corpse.
for (stack_iterator si(a); si; ++si)
{
- if (class_allowed == CORPSE_BODY || si->sub_type == CORPSE_SKELETON)
+ if (si->base_type == OBJ_CORPSES
+ && (class_allowed == CORPSE_BODY
+ || si->sub_type == CORPSE_SKELETON))
{
number_found++;