Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
NPF refuses to pathfind when the destination tile is the same as where the vehicle currently is #7060
For ships this means it will reverse (do a 180º turn) when there are tracks in front of it. It does not walk back. This doesn't happen with OPF or YAPF.
Best way to reproduce:
Yes. Seems a bug.
Solves the problem.
Because it is leaving the tile and needs to find a path back.
Yes. NPF fails if destination tile is origin tile at the moment. It returns INVALID_TRACKDIR. I am looking into it. I have a branch here (6 commits), but I still have to investigate whether this works and doesn't cause new problems.
What is wrong in choosing a track on next tile? Are all-of-a-sudden-180º-turns better?