From 95a217139ca96e4b51cb6a9deed9807fe22fd0d9 Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 10 Jun 2008 02:44:01 +0000 Subject: In _raise_corpse(), if animating a corpse fails because there's nowhere to place the resulting zombie, return false and don't destroy the corpse. This should fix [1988590]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5691 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells3.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spells3.cc') diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index de4fb55810..bc8ed70904 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -893,11 +893,13 @@ static bool _raise_corpse(int x, int y, int corps, beh_type beha, } _equip_undead(x, y, corps, monster, monnum); - } - destroy_item(corps); + destroy_item(corps); - return (true); + return (true); + } + + return (false); } bool animate_a_corpse(int x, int y, corpse_type class_allowed, -- cgit v1.2.3-54-g00ecf