From fdc3cdfa8e1caa581aec6c6b1bb85216aea1529e Mon Sep 17 00:00:00 2001 From: nicbn Date: Fri, 16 Nov 2018 10:25:20 -0200 Subject: [PATCH] Adds NO_BREATH check before calling lungs check_breath (#41526) --- code/modules/mob/living/carbon/life.dm | 4 +++- code/modules/surgery/organs/lungs.dm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 43041df0182..23f6bd69c06 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -121,7 +121,9 @@ //Third link in a breath chain, calls handle_breath_temperature() /mob/living/carbon/proc/check_breath(datum/gas_mixture/breath) - if((status_flags & GODMODE)) + if(status_flags & GODMODE) + return + if(has_trait(TRAIT_NOBREATH)) return var/lungs = getorganslot(ORGAN_SLOT_LUNGS) diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index ff9a29e395e..88617450d0c 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -56,7 +56,7 @@ /obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) - if((H.status_flags & GODMODE)) + if(H.status_flags & GODMODE) return if(H.has_trait(TRAIT_NOBREATH)) return