(829458a66) Don't apply priority modifier on the priority value, because it's already applied to the max value. The priority value should be normalized, because we are using the lerp.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:12:07 +03:00
parent dbccd76613
commit 019712ef66
12 changed files with 90 additions and 16 deletions
@@ -101,7 +101,7 @@ namespace Barotrauma
float maxMultiplier = MathHelper.Min(PriorityModifier, 1);
float max = MathHelper.Min((AIObjectiveManager.OrderPriority - 1) * maxMultiplier, 90);
float devotion = MathHelper.Min(10, Priority);
float value = MathHelper.Min((devotion + targetValue) / 100 * PriorityModifier, 1);
float value = MathHelper.Min((devotion + targetValue) / 100, 1);
return MathHelper.Lerp(0, max, value);
}