fix: remove goal standability check from provisional path

The is_standable_tile(goal) check was causing failures when goal position
wasn't directly standable (common case). A* doesn't require goal to be
standable - it finds the best path it can. Removed the check and return
fallback single-point path when start isn't standable.
This commit is contained in:
2026-03-18 17:12:05 +00:00
parent 9379c7be03
commit 31c93f7926
+1 -7
View File
@@ -585,13 +585,7 @@ pub fn calculate_provisional_path(
LOCAL_FAILED_PATHS.with(|f| {
*f.borrow_mut() += 1;
});
return Vec::new();
}
if !is_standable_tile(tilemap, goal) {
LOCAL_FAILED_PATHS.with(|f| {
*f.borrow_mut() += 1;
});
return Vec::new();
return vec![Vec3::new(start.x as f32, start.y as f32, start.z as f32)];
}
let estimated_tiles = octile_distance_3d(start, goal) / ITILE_SIZE;