Fix target invalidation and reacquisition in AttackFollow.

This commit is contained in:
Paul Chote
2019-01-25 22:14:02 +00:00
parent 5ef7809002
commit 0bfc487999
4 changed files with 149 additions and 68 deletions

View File

@@ -59,10 +59,10 @@ namespace OpenRA.Mods.Cnc.Traits
{
// Check that AttackTDGunboatTurreted hasn't cancelled the target by modifying attack.Target
// Having both this and AttackTDGunboatTurreted modify that field is a horrible hack.
if (hasTicked && attack.Target.Type == TargetType.Invalid)
if (hasTicked && attack.requestedTarget.Type == TargetType.Invalid)
return NextActivity;
attack.Target = target;
attack.requestedTarget = target;
hasTicked = true;
}