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:
Meta Vens 2026-10-17 04:03:08 +02:00
commit 0f2fc859de

View file

@ -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}");