From ffc50c3cfa04af5dc2949bd2630ada3e7aab48a6 Mon Sep 17 00:00:00 2001 From: HarpyEagle Date: Sat, 17 Oct 2015 20:53:03 -0400 Subject: [PATCH] Fixes #11321 --- code/modules/mob/living/carbon/human/life.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 031a69dddb..d5fe68a488 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -364,17 +364,23 @@ internals.icon_state = "internal0" return null + get_breath_from_environment(var/volume_needed=BREATH_VOLUME) + var/datum/gas_mixture/breath = ..() + + if(breath) + //exposure to extreme pressures can rupture lungs + var/check_pressure = breath.return_pressure() + if(check_pressure < ONE_ATMOSPHERE / 5 || check_pressure > ONE_ATMOSPHERE * 5) + if(is_lung_ruptured() && prob(5)) + rupture_lung() + + return breath handle_breath(datum/gas_mixture/breath) if(status_flags & GODMODE) return - //exposure to extreme pressures can rupture lungs - if(breath && (breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)) - if(!is_lung_ruptured() && prob(5)) - rupture_lung() - //check if we actually need to process breath if(!breath || (breath.total_moles == 0) || suiciding) failed_last_breath = 1