fix crash on telling {sam,agun} to attack ground

This commit is contained in:
Chris Forbes
2010-08-04 18:23:06 +12:00
parent 0f20133af0
commit 71792a8f09
2 changed files with 3 additions and 1 deletions

View File

@@ -257,6 +257,6 @@ namespace OpenRA.Mods.RA
public bool HasAnyValidWeapons(Target t) { return Weapons.Any(w => w.IsValidAgainst(t)); }
public float GetMaximumRange() { return Weapons.Max(w => w.Info.Range); }
public Weapon ChooseWeaponForTarget(Target t) { return Weapons.First(w => w.IsValidAgainst(t)); }
public Weapon ChooseWeaponForTarget(Target t) { return Weapons.FirstOrDefault(w => w.IsValidAgainst(t)); }
}
}