Commit 77a4dcc
fix: Suppress bestClosedNode oscillation during exploratory retry cooldown
When normal A* exhausts its node budget and triggers an exploratory retry,
a short partial path is built toward the goal. Once that path is consumed
(typically in 1-2 frames), the next A* call during the cooldown window
previously fell through to bestClosedNode, which pointed in a different
direction (toward open space), causing visible 1-tile back-and-forth
oscillation in congested narrow corridors.
Now, when we are still in cooldown for the same destination, we return
tsBlocked instead of emitting a bestClosedNode path. The unit waits
until the cooldown expires and a fresh exploratory retry fires.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent a92d697 commit 77a4dcc
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
859 | 870 | | |
860 | 871 | | |
861 | 872 | | |
| |||
0 commit comments