mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Fixes projectiles being able to hit humans in organs they do not have.
Will also prevent body shields blocking bullets with non-existant limbs. Expands on the special return values for bullet_act(), adds defines for them.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
/obj/structure/girder/bullet_act(var/obj/item/projectile/Proj)
|
||||
//Girders only provide partial cover. There's a chance that the projectiles will just pass through. (unless you are trying to shoot the girder)
|
||||
if(Proj.original != src && !prob(cover))
|
||||
return -1 //pass through
|
||||
return PROJECTILE_CONTINUE //pass through
|
||||
|
||||
//Tasers and the like should not damage girders.
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
passthrough = 1
|
||||
|
||||
if(passthrough)
|
||||
. = -1
|
||||
. = PROJECTILE_CONTINUE
|
||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||
|
||||
src.health -= damage*0.2
|
||||
|
||||
Reference in New Issue
Block a user