Allow Attack activities to target FrozenActors directly.
Removing the legacy FrozenActor to Actor workaround fixes a number of long-standing bugs. This also prevents units from losing their target when it transforms into a different actor type.
This commit is contained in:
committed by
Oliver Brakmann
parent
0406b89a96
commit
c34dd4b824
@@ -18,10 +18,10 @@ namespace OpenRA.Mods.Common.Activities
|
||||
{
|
||||
public class FlyAttack : Activity
|
||||
{
|
||||
readonly Target target;
|
||||
readonly Aircraft aircraft;
|
||||
readonly AttackAircraft attackAircraft;
|
||||
readonly Rearmable rearmable;
|
||||
Target target;
|
||||
|
||||
int ticksUntilTurn;
|
||||
|
||||
@@ -43,6 +43,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
target = target.Recalculate(self.Owner);
|
||||
|
||||
if (!target.IsValidFor(self))
|
||||
return NextActivity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user