(f0837188e) Bots now target only reported targets when the objective is not an order.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:31:48 +03:00
parent 4f825ce309
commit 5f610caadd
16 changed files with 272 additions and 353 deletions
@@ -35,6 +35,8 @@ namespace Barotrauma
public IEnumerable<AIObjective> SubObjectives => subObjectives;
public AIObjective CurrentSubObjective { get; private set; }
public event Action Completed;
protected HumanAIController HumanAIController => character.AIController as HumanAIController;
protected IndoorsSteeringManager PathSteering => HumanAIController.PathSteering;
protected SteeringManager SteeringManager => HumanAIController.SteeringManager;
@@ -94,7 +96,12 @@ namespace Barotrauma
return;
}
bool wasCompleted = IsCompleted();
Act(deltaTime);
if (!wasCompleted && IsCompleted())
{
Completed?.Invoke();
}
}
public void AddSubObjective(AIObjective objective)