make order queuing work for buildings and turreted units, too

This commit is contained in:
Bob
2010-11-14 15:48:02 +13:00
parent 7c146a9d5d
commit f8e6245903
16 changed files with 128 additions and 129 deletions

View File

@@ -27,10 +27,10 @@ namespace OpenRA.Mods.RA.Air
return new FlyAttack( newTarget );
}
protected override bool CanAttack(Actor self)
protected override bool CanAttack(Actor self, Target target)
{
// dont fire while landed
return base.CanAttack(self)
return base.CanAttack(self, target)
&& self.Trait<Aircraft>().Altitude > 0;
}
}

View File

@@ -28,7 +28,6 @@ namespace OpenRA.Mods.RA.Air
Cancel( self );
var attack = self.Trait<AttackPlane>();
attack.target = Target;
attack.DoAttack( self, Target );
if( inner == null )

View File

@@ -46,7 +46,6 @@ namespace OpenRA.Mods.RA.Air
if( !float2.WithinEpsilon( float2.Zero, dist, range * Game.CellSize ) )
aircraft.TickMove( 1024 * aircraft.MovementSpeed, desiredFacing );
attack.target = target;
attack.DoAttack( self, target );
return this;