(2f379083c) Change how some of the priorities are clamped.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:06:30 +03:00
parent b5db30ec72
commit b7272e1c96
18 changed files with 165 additions and 42 deletions
@@ -25,7 +25,8 @@ namespace Barotrauma
return AIObjectiveManager.OrderPriority;
}
float basePriority = MathHelper.Clamp(Priority, 0, 10);
return MathHelper.Clamp(basePriority + fireCount * 20, 0, 100);
float max = MathHelper.Min(AIObjectiveManager.OrderPriority + 20, 100);
return MathHelper.Clamp(basePriority + fireCount * 20, 0, max);
}
public override bool IsCompleted() => false;