(98501b696) Reduce the max accepted distance for repair tool ai operate.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:30:23 +03:00
parent 348f21598e
commit 54a0164f89
34 changed files with 387 additions and 227 deletions
@@ -115,20 +115,17 @@ namespace Barotrauma
public virtual void Update(float deltaTime)
{
var subObjective = objectiveManager.CurrentObjective?.CurrentSubObjective;
if (objectiveManager.CurrentOrder == this)
{
Priority = AIObjectiveManager.OrderPriority;
}
else if (objectiveManager.WaitTimer <= 0)
else if (objectiveManager.CurrentObjective == this || subObjective == this)
{
var subObjective = objectiveManager.CurrentObjective?.CurrentSubObjective;
if ((objectiveManager.CurrentObjective == this || subObjective == this))
{
Priority += Devotion * PriorityModifier * deltaTime;
}
Priority = MathHelper.Clamp(Priority, 0, 100);
subObjectives.ForEach(so => so.Update(deltaTime));
Priority += Devotion * PriorityModifier * deltaTime;
}
Priority = MathHelper.Clamp(Priority, 0, 100);
subObjectives.ForEach(so => so.Update(deltaTime));
}
/// <summary>