diff --git a/src/entities/shared_systems/pathfinding.rs b/src/entities/shared_systems/pathfinding.rs index c71fc22..f62fe46 100644 --- a/src/entities/shared_systems/pathfinding.rs +++ b/src/entities/shared_systems/pathfinding.rs @@ -592,15 +592,15 @@ pub fn movement( } } + if ambulatory.collision_delay > 0 { + ambulatory.collision_delay -= 1; + return; + } + if let Some(path) = &ambulatory.current_path { if ambulatory.path_index < path.len() { let next_point = path[ambulatory.path_index]; - if ambulatory.collision_delay > 0 { - ambulatory.collision_delay -= 1; - return; - } - let current_crowded = occupancy.count_at(transform.translation) > 2; let occupied = !current_crowded && occupancy.count_at(next_point) > 0; if occupied {