HomeWildfire Games

Unit Motion - make sure units don't get stuck in the special long-path…

Description

Unit Motion - make sure units don't get stuck in the special long-path computation step.

In some rare cases, units could be stuck in the special state of 3 failed path computations, making them always compute long paths instead of trying short paths again. This can happen when they compute a long path successfully, but the unit cannot actually move as it gets obstructed right away.
Make sure this state is never kept for more than one turn to fix this problem.

Refs #5569 (probable fix but kept open for further investigating).

Differential Revision: https://code.wildfiregames.com/D2239