summaryrefslogtreecommitdiffstats
path: root/deco.c
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-09-20 07:52:14 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-20 07:56:25 -0700
commit28c1dc754d1e0ef6212982a32d620a564f22ac3d (patch)
tree2f0c910bc01669692b2219b0833d54635c976a9a /deco.c
parenta77d1a3f56c5c5da57dd817507979f63ac6e4761 (diff)
downloadsubsurface-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/deco.c b/deco.c
index ec4501bb7..39a6b348c 100644
--- a/deco.c
+++ b/deco.c
@@ -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;
}