mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Fixes projectiles embedding in mobs that they pass through
This commit is contained in:
@@ -13,16 +13,17 @@
|
||||
var/mob/living/L = target
|
||||
shake_camera(L, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/on_penetrate(var/atom/A)
|
||||
if(!A || !A.density) return 1 //if whatever it was got destroyed when we hit it, then I guess we can just keep going
|
||||
/obj/item/projectile/bullet/check_penetrate(var/atom/A)
|
||||
if(!A || !A.density) return 1 //if whatever it was got destroyed when we hit it, then I guess we can just keep going
|
||||
|
||||
if(istype(A, /obj/mecha))
|
||||
return 1 //mecha have their own penetration handling
|
||||
|
||||
if(ismob(A))
|
||||
if(iscarbon(A))
|
||||
if (damage <= 20 && !prob(damage)) return 0
|
||||
damage *= 0.7 //squishy mobs absorb KE
|
||||
//squishy mobs absorb KE
|
||||
if(can_embed()) return 0
|
||||
damage *= 0.7
|
||||
return 1
|
||||
|
||||
var/chance = 0
|
||||
|
||||
Reference in New Issue
Block a user