From c8c544f48977d30940bf24ce91cd752e114a7f6a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 14:35:00 +0200 Subject: [PATCH] PatrolOrbitsState: compare the task by reference Co-Authored-By: Claude Sonnet 5.5 --- Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs index d6e0f009e..4fc844985 100644 --- a/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs +++ b/Assets/Scripts/ServerShared/Agents/Tasks/PatrolOrbits.cs @@ -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)); } } \ No newline at end of file