Fixes projectiles embedding in mobs that they pass through

This commit is contained in:
mwerezak
2015-02-17 01:36:50 -05:00
parent 8c3660357a
commit b1546ee3eb
3 changed files with 22 additions and 10 deletions
@@ -38,9 +38,9 @@ emp_act
return -1 // complete projectile permutation
//Shrapnel
if (P.damage_type == BRUTE)
if (P.can_embed())
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
if(P.embed && prob(20 + max(P.damage - armor, -10)))
var/obj/item/weapon/shard/shrapnel/SP = new()
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."