Destroyed items now use drop_from_inventory instead of unEquip. Reduces the risk of references being kept in case of held items.

This commit is contained in:
PsiOmega
2015-07-13 10:20:46 +02:00
parent 9ba21f3079
commit 64cda4aa5a

View File

@@ -65,9 +65,10 @@
/obj/item/Destroy()
if(ismob(loc))
var/mob/m = loc
m.unEquip(src, 1)
m.drop_from_inventory(src)
m.update_inv_r_hand()
m.update_inv_l_hand()
src.loc = null
return ..()
/obj/item/device
@@ -604,4 +605,4 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/pwr_drain()
return 0 // Process Kill
return 0 // Process Kill