Revert 7ca1793: Using Trackdir keyed node is not required, Exitdir keyed node still have the correct trackdir #9576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
Trackdir keyed nodes are forced when 45° and 90° penalties for ships differ (and they differ when using default values).
That implies a lot more nodes are opened when pathfinding, which implies more closed node, and when enough nodes are closed (default 10K), pathfinding just stops and ship says "can't reach destination".
But using trackdir keyed nodes for different curve penalties is not required at all, because even for exitdir keyed nodes the correct trackdir is still available (and already used to determine next tile).
Description
Revert the commit introducing the forced switch to trackdir keyed nodes.
Hugely decreases the number of nodes opened to find a path, which increases the chance to actually find one where using trackdirs would bail out before finding it.
Limitations
Found paths may be a little different, but in most cases they are the same.
Using trackdir keyed nodes:
Using exitdir keyed nodes:
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.