Merge pull request #8122 from deathride58/fixesheadstamloss

Fixes staminaloss targeted at the head not redirecting to the chest
This commit is contained in:
nik707
2019-03-18 00:30:37 -05:00
committed by GitHub
@@ -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)