From 694f0706bbf1e94ce4a53655f8454e095ff31a82 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 036a84b8b1a..a5a877990af 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -491,10 +491,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