Fix AttackFollow (and consequently AttackTurreted) firing at old target when the trait is reenabled
Most noticeable by ordering a deployed Tick Tank to fire at the ground, then undeploying it and deploying it again.
This commit is contained in:
@@ -30,6 +30,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public virtual void Tick(Actor self)
|
||||
{
|
||||
if (IsTraitDisabled)
|
||||
{
|
||||
Target = Target.Invalid;
|
||||
return;
|
||||
}
|
||||
|
||||
DoAttack(self, Target);
|
||||
IsAttacking = Target.IsValidFor(self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user