(dabdac1a8) Fix bots waiting where they should not wait.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:31:31 +03:00
parent 27506eb10f
commit 4f825ce309
9 changed files with 344 additions and 103 deletions
@@ -170,7 +170,6 @@ namespace Barotrauma
}
else
{
WaitTimer -= deltaTime;
if (character.AIController is HumanAIController humanAI && humanAI.SteeringManager != null)
{
if (!character.AnimController.InWater &&
@@ -178,8 +177,13 @@ namespace Barotrauma
!humanAI.UnsafeHulls.Contains(character.CurrentHull) &&
!AIObjectiveIdle.IsForbidden(character.CurrentHull))
{
WaitTimer -= deltaTime;
humanAI.SteeringManager.Reset();
}
else
{
CurrentObjective?.TryComplete(deltaTime);
}
}
}
}