HomeWildfire Games

Update the gather LastPos alongside the combat LastPos when hunting to more…

Description

Update the gather LastPos alongside the combat LastPos when hunting to more efficiently hunt.

When units are hunting, they push an attacking order in front.

That attacking order keeps track of the target's last known position to efficiently hunt. However, if the unit goes out of LOS, ShouldAbandonChase triggers and the unit goes back to the gather order - which hby then as a hopelessly out of date "LastPos".
By updating the LastPos of the gather order as well, Gather can recover efficiently.

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