So I've been searching for a cause to the issue that units sometimes don't take the obvious best path when using the short pathfinder.
It appears to me to be because there is an issue with out handling of the "quadrant" optimisation.
This introduces two changes:
- Compute the outward quadrants once and for all instead of setting them dynamically, because there is no reason why we should always arrive from the same quadrant as the first time we see a vertex.
- don't consider quadrants for the start-vertex, because of the edge expansion (which can put us in illegal quadrants)
These result in better paths for probably very slightly worse performance.