fix: four interlocking pathfinding bugs causing panic, failure, and yo-yo teleportation

1. CSV Overflow Panic: Use saturating_sub to prevent underflow when total_failed_paths > n
2. Heuristic Scale Mismatch: octile_distance_3d now divides by ITILE_SIZE to match g-score units
3. Goal Z Offset: Correct target.as_ivec3() - ivec3(0,0,1) not ITILE_SIZE (target already has +1.0)
4. Gravity Yo-Yo: Clear current_path and target when entity falls to prevent teleportation loop
This commit is contained in:
2026-03-18 17:49:07 +00:00
parent 00cbd92491
commit e9ef5ebbcd
2 changed files with 1908 additions and 6 deletions
+1900
View File
File diff suppressed because it is too large Load Diff