diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-09-20 07:52:14 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-20 07:56:25 -0700 |
commit | 28c1dc754d1e0ef6212982a32d620a564f22ac3d (patch) | |
tree | 2f0c910bc01669692b2219b0833d54635c976a9a /deco.c | |
parent | a77d1a3f56c5c5da57dd817507979f63ac6e4761 (diff) | |
download | subsurface-28c1dc754d1e0ef6212982a32d620a564f22ac3d.tar.gz |
Only calculate crushing pressure in VPM-B mode
Don't do this expensive calculation when not needed.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'deco.c')
-rw-r--r-- | deco.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -511,7 +511,8 @@ void add_segment(double pressure, const struct gasmix *gasmix, int period_in_sec tissue_n2_sat[ci] += n2_satmult * pn2_oversat * n2_f; tissue_he_sat[ci] += he_satmult * phe_oversat * he_f; } - calc_crushing_pressure(pressure); + if(prefs.deco_mode == VPMB && in_planner()) + calc_crushing_pressure(pressure); return; } |