ConsumableAiTests: the following agent leaves combat before it is set to follow
The agent starts in combat; two zone ticks with nothing sensed return it to patrol, as the patrol test does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
199f1b1b94
commit
0f2fc859de
1 changed files with 3 additions and 0 deletions
|
|
@ -528,6 +528,9 @@ public sealed class ConsumableAiTests : IDisposable
|
|||
var s = Build(carryVent: true);
|
||||
var agent = s.Zone.Agents.Single();
|
||||
s.Agent.VisibleEnemies.Clear();
|
||||
s.Zone.Update(.05f);
|
||||
s.Zone.Update(.05f);
|
||||
Assert.True(s.Agent.Target.Value.IsNone);
|
||||
agent.Task = new FollowTask { Anchor = s.Prey, Standoff = 100 };
|
||||
for (var i = 0; i < 6 && !(s.State is FollowState); i++) agent.Update(.05f);
|
||||
Assert.True(s.State is FollowState, $"the agent is in {s.State?.GetType().Name}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue