PatrolOrbitsState: arrival advances the circuit only while the pilot is still on its task
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
90462179b8
commit
9978d28763
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ public class PatrolOrbitsState : BaseState
|
|||
Transitions.Add(new StateTransition(patrolMoveState,
|
||||
() => true,
|
||||
() => patrolMoveState.Orbit = CurrentTarget));
|
||||
patrolMoveState.Transitions.Add(new StateTransition(this, () => patrolMoveState.Distance < 10, NextTarget));
|
||||
// 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));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue