diff options
Diffstat (limited to 'azalea/src/pathfinder/execute')
| -rw-r--r-- | azalea/src/pathfinder/execute/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/execute/mod.rs b/azalea/src/pathfinder/execute/mod.rs index a06d1c0f..9e169a91 100644 --- a/azalea/src/pathfinder/execute/mod.rs +++ b/azalea/src/pathfinder/execute/mod.rs @@ -427,12 +427,14 @@ pub fn recalculate_near_end_of_path( if (executing_path.path.len() == 50 || executing_path.path.len() < 5) && !pathfinder.is_calculating && executing_path.is_path_partial + // don't recalculate if we're already planning on switching to a different path + && executing_path.queued_path.is_none() { match pathfinder.goal.as_ref().cloned() { Some(goal) => { debug!("Recalculating path because it's empty or ends soon"); debug!( - "recalculate_near_end_of_path executing_path.is_path_partial: {}", + " executing_path.is_path_partial: {}", executing_path.is_path_partial ); |
