(02bbfb6a3) Let the ai objectives handle waiting (after switching characters). Currently only idle objective uses wait timer, others ignore it. Reduce the wait time from 20 to 10 secs.
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Barotrauma
|
||||
private Character character;
|
||||
|
||||
/// <summary>
|
||||
/// When set above zero, the character will stand still doing nothing until the timer runs out (assuming they don't a high priority order active)
|
||||
/// When set above zero, the character will stand still doing nothing until the timer runs out. Only affects idling.
|
||||
/// </summary>
|
||||
public float WaitTimer;
|
||||
|
||||
@@ -134,12 +134,7 @@ namespace Barotrauma
|
||||
|
||||
public void DoCurrentObjective(float deltaTime)
|
||||
{
|
||||
if (CurrentObjective == null || (CurrentObjective.GetPriority(this) < OrderPriority && WaitTimer > 0.0f))
|
||||
{
|
||||
WaitTimer -= deltaTime;
|
||||
character.AIController.SteeringManager.Reset();
|
||||
return;
|
||||
}
|
||||
if (WaitTimer > 0.0f) { WaitTimer -= deltaTime; }
|
||||
CurrentObjective?.TryComplete(deltaTime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user