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:
mwerezak
2015-07-28 20:23:26 -04:00
parent d203362d38
commit 6df770cab3
8 changed files with 25 additions and 15 deletions
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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