From 4ea9cdb003d3664e1e046f719568b9f0fd93b3df Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 19 Apr 2011 18:28:35 +1200 Subject: [PATCH] allow FlyAttack to work without AttackPlane --- OpenRA.Mods.RA/Air/FlyAttack.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/Air/FlyAttack.cs b/OpenRA.Mods.RA/Air/FlyAttack.cs index 15162a93b3..d21976db01 100755 --- a/OpenRA.Mods.RA/Air/FlyAttack.cs +++ b/OpenRA.Mods.RA/Air/FlyAttack.cs @@ -28,8 +28,9 @@ namespace OpenRA.Mods.RA.Air if( limitedAmmo != null && !limitedAmmo.HasAmmo() ) Cancel( self ); - var attack = self.Trait(); - attack.DoAttack( self, Target ); + var attack = self.TraitOrDefault(); + if (attack != null) + attack.DoAttack( self, Target ); if( inner == null ) {