PatrolOrbitsState: compare the task by reference
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
080dbed07d
commit
c8c544f489
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue