Fixes staminaloss not redirecting to the chest when attempting to apply to the head

This commit is contained in:
deathride58
2019-03-15 20:09:34 -04:00
parent ccca2ac8a8
commit 9d711370d4
@@ -1653,13 +1653,19 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/obj/item/bodypart/BP = null
if(isbodypart(def_zone))
BP = def_zone
if(damagetype == STAMINA && istype(def_zone, /obj/item/bodypart/head))
BP = H.get_bodypart(check_zone(BODY_ZONE_CHEST))
else
BP = def_zone
else
if(!def_zone)
def_zone = ran_zone(def_zone)
if(damagetype == STAMINA && def_zone == BODY_ZONE_HEAD)
def_zone = BODY_ZONE_CHEST
BP = H.get_bodypart(check_zone(def_zone))
if(!BP)
BP = H.bodyparts[1]
if(!BP)
BP = H.bodyparts[1]
switch(damagetype)
if(BRUTE)