From 022e21d4843516b8d07ac9ca1eebf8e9e326b806 Mon Sep 17 00:00:00 2001 From: popertots Date: Sat, 4 Apr 2026 12:02:15 +0100 Subject: [PATCH] Fix: Don't clear ambulatory.target during job assignment The target oscillation was caused by job_pathfinding_system clearing ambulatory.target = None on assignment, then the executor setting it to approach, then job_pathfinding clearing it again the next frame. By not clearing ambulatory.target, the executor sets it once and it persists until the task completes. --- src/entities/tasks/job_pathfinding.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/entities/tasks/job_pathfinding.rs b/src/entities/tasks/job_pathfinding.rs index 049b3c4..0d763db 100644 --- a/src/entities/tasks/job_pathfinding.rs +++ b/src/entities/tasks/job_pathfinding.rs @@ -290,7 +290,6 @@ pub fn job_pathfinding_system( queue.push(task); *state = TaskState::Pending; ambulatory.current_path = None; - ambulatory.target = None; ambulatory.path_index = 0; info!(