Melee embedding fix.

This commit is contained in:
Zuhayr
2013-06-13 22:59:13 -07:00
parent 3cb36272cb
commit b30b156950
@@ -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("<span class='danger'>\The [W] sticks in the wound!</span>")
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()