(f5be65240) Optimized explosions a bit, toned down wall damage effect when the wall has a small amount of damage.

This commit is contained in:
Joonas Rikkonen
2019-03-27 11:30:33 +02:00
parent 6fd4d14497
commit bb17463aae
2 changed files with 22 additions and 9 deletions
@@ -292,8 +292,7 @@ namespace Barotrauma
{
if (damageEffect != null)
{
float newCutoff = Sections[i].damage > 0 ?
MathHelper.Lerp(0.2f, 0.65f, Sections[i].damage / Prefab.Health) : 0.0f;
float newCutoff = MathHelper.Lerp(0.0f, 0.65f, Sections[i].damage / Prefab.Health);
if (Math.Abs(newCutoff - Submarine.DamageEffectCutoff) > 0.01f || color != Submarine.DamageEffectColor)
{