PatrolOrbitsState: compare the task by reference

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-08 14:35:00 +02:00
commit c8c544f489

View file

@ -28,6 +28,6 @@ public class PatrolOrbitsState : BaseState
() => true,
() => patrolMoveState.Orbit = CurrentTarget));
// Arrival advances the circuit only while the pilot is still on this task: a task change leaves the patrol first.
patrolMoveState.Transitions.Add(new StateTransition(this, () => patrolMoveState.Distance < 10 && agent.Task == Task, NextTarget));
patrolMoveState.Transitions.Add(new StateTransition(this, () => patrolMoveState.Distance < 10 && ReferenceEquals(agent.Task, Task), NextTarget));
}
}