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.
This commit is contained in:
mwerezak
2014-05-27 14:07:18 -04:00
committed by ZomgPonies
parent 19c0352836
commit ca176b63f5
+3 -2
View File
@@ -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