From b30b1569506e2b42ce696c35fda857518bad80be Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Thu, 13 Jun 2013 22:59:13 -0700 Subject: [PATCH] Melee embedding fix. --- code/modules/mob/living/carbon/human/human_damage.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 1cf951c53b8..5d4e1da9b69 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -226,12 +226,16 @@ //Embedded projectile code. if(!organ) return if(istype(used_weapon,/obj/item/weapon)) - var/obj/item/weapon/W = used_weapon + var/obj/item/weapon/W = used_weapon //Sharp objects will always embed if they do enough damage. if(damage > (5*W.w_class) && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick. - W.loc = src //Sharp objects will always embed if they do enough damage. organ.implants += W visible_message("\The [W] sticks in the wound!") W.add_blood(src) + if(ismob(W.loc)) + var/mob/living/H = W.loc + H.drop_item() + W.loc = src + else if(istype(used_weapon,/obj/item/projectile)) //We don't want to use the actual projectile item, so we spawn some shrapnel. if(prob(50) && damagetype == BRUTE) var/obj/item/weapon/shard/shrapnel/S = new()