summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/misc.cc34
1 files changed, 16 insertions, 18 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 70f14eb31b..9c38fb5ac0 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -181,18 +181,17 @@ void turn_corpse_into_chunks(item_def &item)
void turn_corpse_into_skeleton_and_chunks(item_def &item)
{
+ item_def chunks = item;
+
if (mons_skeleton(item.plus))
+ turn_corpse_into_skeleton(item);
+
+ int o = get_item_slot();
+ if (o != NON_ITEM)
{
- int o = get_item_slot();
- if (o != NON_ITEM)
- {
- item_def skel = item;
- turn_corpse_into_skeleton(skel);
- copy_item_to_grid(skel, you.pos());
- }
+ turn_corpse_into_chunks(chunks);
+ copy_item_to_grid(chunks, you.pos());
}
-
- turn_corpse_into_chunks(item);
}
// Initialize blood potions with a vector of timers.
@@ -916,18 +915,17 @@ void turn_corpse_into_blood_potions(item_def &item)
void turn_corpse_into_skeleton_and_blood_potions(item_def &item)
{
+ item_def blood_potions = item;
+
if (mons_skeleton(item.plus))
+ turn_corpse_into_skeleton(item);
+
+ int o = get_item_slot();
+ if (o != NON_ITEM)
{
- int o = get_item_slot();
- if (o != NON_ITEM)
- {
- item_def skel = item;
- turn_corpse_into_skeleton(skel);
- copy_item_to_grid(skel, you.pos());
- }
+ turn_corpse_into_blood_potions(blood_potions);
+ copy_item_to_grid(blood_potions, you.pos());
}
-
- turn_corpse_into_blood_potions(item);
}
// A variation of the mummy curse: