Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types

This commit is contained in:
atlimit8
2015-08-03 16:07:33 -05:00
parent 6970959ef1
commit 09984683a7
115 changed files with 195 additions and 193 deletions

View File

@@ -55,7 +55,7 @@ namespace OpenRA.Mods.Cnc.Traits
if (!self.IsInWorld || self.IsDead)
return;
var altitude = self.World.Map.Rules.Actors[actorType].Traits.Get<PlaneInfo>().CruiseAltitude;
var altitude = self.World.Map.Rules.Actors[actorType].TraitInfo<PlaneInfo>().CruiseAltitude;
var actor = w.CreateActor(actorType, new TypeDictionary
{
new CenterPositionInit(w.Map.CenterOfCell(startPos) + new WVec(WDist.Zero, WDist.Zero, altitude)),