removed LegacyInfo from Actor

This commit is contained in:
Chris Forbes
2010-01-12 22:07:42 +13:00
parent ee14b0a670
commit 0cb5eca673
2 changed files with 20 additions and 15 deletions

View File

@@ -51,5 +51,13 @@ namespace OpenRa.Game
return Rules.WeaponInfo[weapon];
}
public static int GetMaxHP(this Actor self)
{
if (self.Info == null) return 0;
var oai = self.Info.Traits.GetOrDefault<OwnedActorInfo>();
if (oai == null) return 0;
return oai.HP;
}
}
}