mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 21:27:01 +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:
@@ -10,9 +10,11 @@ emp_act
|
||||
|
||||
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
|
||||
var/obj/item/organ/external/organ = get_organ(check_zone(def_zone))
|
||||
if(!organ)
|
||||
return
|
||||
def_zone = check_zone(def_zone)
|
||||
if(!has_organ(def_zone))
|
||||
return PROJECTILE_FORCE_MISS //if they don't have the organ in question then the projectile just passes by.
|
||||
|
||||
var/obj/item/organ/external/organ = get_organ()
|
||||
|
||||
//Shields
|
||||
if(check_shields(P.damage, "the [P.name]"))
|
||||
@@ -37,7 +39,7 @@ emp_act
|
||||
// redirect the projectile
|
||||
P.redirect(new_x, new_y, curloc, src)
|
||||
|
||||
return -1 // complete projectile permutation
|
||||
return PROJECTILE_CONTINUE // complete projectile permutation
|
||||
|
||||
//Shrapnel
|
||||
if(P.can_embed())
|
||||
|
||||
Reference in New Issue
Block a user