some accessors

This commit is contained in:
Chris Forbes
2010-01-11 21:59:32 +13:00
parent e7a99541e5
commit 10a5b40e16
5 changed files with 34 additions and 15 deletions

View File

@@ -78,9 +78,9 @@ namespace OpenRa.Game
{
var info = self.Info.Traits.WithInterface<AttackBaseInfo>().First();
if (info.PrimaryWeapon != null &&
WeaponValidForTarget(Rules.WeaponInfo[info.PrimaryWeapon], target)) return true;
WeaponValidForTarget(self.GetPrimaryWeapon(), target)) return true;
if (info.SecondaryWeapon != null &&
WeaponValidForTarget(Rules.WeaponInfo[info.SecondaryWeapon], target)) return true;
WeaponValidForTarget(self.GetSecondaryWeapon(), target)) return true;
return false;
}