(29f9396dc) Fix the devotion clamps.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:49:15 +03:00
parent 351e7bbd71
commit c28106812d
13 changed files with 224 additions and 255 deletions
@@ -33,7 +33,7 @@ namespace Barotrauma
float distanceFactor = MathHelper.Lerp(1, 0.1f, MathUtils.InverseLerp(0, 10000, dist));
float severity = AIObjectiveExtinguishFires.GetFireSeverity(targetHull);
float severityFactor = MathHelper.Lerp(0, 1, severity / 100);
float devotion = Math.Max(Priority, 10) / 100;
float devotion = Math.Min(Priority, 10) / 100;
return MathHelper.Lerp(0, 100, MathHelper.Clamp(devotion + severityFactor * distanceFactor, 0, 1));
}