(900eddc26) Take the priority modifier in account when calculating the priority, not the max value.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:13:03 +03:00
parent 3c8707fc16
commit ab2ca90d08
15 changed files with 123 additions and 94 deletions
@@ -50,9 +50,8 @@ namespace Barotrauma
return AIObjectiveManager.OrderPriority;
}
float devotion = MathHelper.Min(10, Priority);
float value = (devotion + (AIObjectiveManager.OrderPriority / 2)) * PriorityModifier;
float maxMultiplier = MathHelper.Min(PriorityModifier, 1);
float max = MathHelper.Min((AIObjectiveManager.OrderPriority - 1) * maxMultiplier, 90);
float value = (devotion + AIObjectiveManager.OrderPriority / 2) * PriorityModifier;
float max = MathHelper.Min((AIObjectiveManager.OrderPriority - 1), 90);
return MathHelper.Clamp(value, 0, max);
}