HomeWildfire Games

Fix ranged unit chasing following rP24797

Description

Fix ranged unit chasing following rP24797

D3230 / rP24797 introduced range checking at turn start, and removed a hack that made units predict the position of their target too far ahead. This worked fine when in "straight movement" mode, unfortunately I failed to recognise that ranged units would never use that mode. This meant that ranged-unit chasing was broken.

There is a straightforward fix however, since we can simply change TryGoingStraightToTarget to be used by ranged units. It fixes the issue efficiently and improves movement for ranged units in general, so it probably should have been done from the start.

Refs #5936

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