From ca176b63f53f05032c3729e415c1ae0e8d512d0f Mon Sep 17 00:00:00 2001 From: mwerezak Date: Tue, 27 May 2014 02:39:32 -0400 Subject: [PATCH] Fixes inhale_pp ratio The amount of inhaled gas used shouldn't approach infinity as inhale_pp goes to zero, should it? Also the amount of gas used should decrease with inhale_pp as the oxyloss is being caused by the fact that fewer moles are entering the bloodstream. --- code/modules/mob/living/carbon/human/life.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 04d5e088733..7a90a8fdc28 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -533,10 +533,11 @@ if(prob(20)) spawn(0) emote("gasp") if(inhale_pp > 0) - var/ratio = safe_pressure_min/inhale_pp + var/ratio = inhale_pp/safe_pressure_min // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!) - adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) + // What's going on here? ratio will always be < 1, and HUMAN_MAX_OXYLOSS = 1... + adjustOxyLoss(min(5*(1/ratio), HUMAN_MAX_OXYLOSS)) failed_last_breath = 1 inhaled_gas_used = inhaling*ratio/6