From 99b568b287d3f1140af4fcfdb8c272cc80fb4160 Mon Sep 17 00:00:00 2001 From: Sebastian Broberg Date: Sun, 28 Aug 2016 21:54:11 +0200 Subject: [PATCH] Flooding tweak --- Subsurface/Source/Map/Structure.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Subsurface/Source/Map/Structure.cs b/Subsurface/Source/Map/Structure.cs index e5c4f739b..c812d66bc 100644 --- a/Subsurface/Source/Map/Structure.cs +++ b/Subsurface/Source/Map/Structure.cs @@ -595,8 +595,8 @@ namespace Barotrauma } } - if (sections[sectionIndex].gap != null) - sections[sectionIndex].gap.Open = (float)Math.Pow(((damage / prefab.MaxHealth)-0.5)*2.0, 2.0); + if (sections[sectionIndex].gap != null) + sections[sectionIndex].gap.Open = (damage/prefab.MaxHealth - 0.5f)*2; bool hadHole = SectionBodyDisabled(sectionIndex); sections[sectionIndex].damage = MathHelper.Clamp(damage, 0.0f, prefab.MaxHealth);