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.
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user