Using a better test map, I've noticed two subsequent issues with chasing.
- First, units take turn while turning, and though rP24708 gave some additional leeway, this still wasn't enough sometimes. I've added a check to skip the first long waypoint in some cases, which should avoid the worst of the problem.
- Secondly, and I didn't notice this in rP24708, because units predict the target's position if their ID is higher (see D3230), but the problem only exists while processing movements, the "PathingUpdateNeeded" check failed on PathResult in some cases. This meant the "follow known bad path" hack activated, and that led units to have sub-optimal speed, which made it impossible to get in range of the 'direct movement' mechanic, which meant chasing failed.
The latter issue is fixed by:
- Removing a 'distance' modulation introduced in rP22474 which I don't really understand / doesn't seem necessary (no words in the commit message).
- Making sure that the interpolation doesn't take place outside of its designated area, using a boolean. It's ugly, but meh.