allow FlyAttack to work without AttackPlane

This commit is contained in:
Chris Forbes
2011-04-19 18:28:35 +12:00
parent ca379ce007
commit 4ea9cdb003

View File

@@ -28,8 +28,9 @@ namespace OpenRA.Mods.RA.Air
if( limitedAmmo != null && !limitedAmmo.HasAmmo() )
Cancel( self );
var attack = self.Trait<AttackPlane>();
attack.DoAttack( self, Target );
var attack = self.TraitOrDefault<AttackPlane>();
if (attack != null)
attack.DoAttack( self, Target );
if( inner == null )
{