removed LegacyInfo from Actor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user