UnitMotion - Explicit handling of movement errors (such as target death) in Combat.Approaching
In A23, units that are approaching an enemy (Combat.Approaching) will carry on moving to their last waypoint if the target dies, and then go idle.
As of rP22415, this no longer happens and units stop in their tracks, staying in attacking forever.
This lets Combat.Approaching explicitly handle the error, deciding what is best to do:
- go to the next order (for hunting and queued orders)
- find new targets nearby (in case the attack wasn't a forced order)
- walk to the target's last known position and find units to attack there (in case it was). This is A23 behaviour.
Differential Revision: https://code.wildfiregames.com/D1992