fixing some more bits

This commit is contained in:
Chris Forbes
2010-01-12 15:47:11 +13:00
parent 275100938d
commit df330f3151
6 changed files with 26 additions and 17 deletions

View File

@@ -6,6 +6,8 @@ namespace OpenRa.Game.Traits
{
class RallyPointInfo : ITraitInfo
{
public readonly int[] RallyPoint = { 1, 3 };
public object Create(Actor self) { return new RallyPoint(self); }
}
@@ -17,8 +19,8 @@ namespace OpenRa.Game.Traits
public RallyPoint(Actor self)
{
var bi = self.traits.Get<Building>().unitInfo;
rallyPoint = self.Location + new int2(bi.RallyPoint[0], bi.RallyPoint[1]);
var info = self.Info.Traits.Get<RallyPointInfo>();
rallyPoint = self.Location + new int2(info.RallyPoint[0], info.RallyPoint[1]);
anim = new Animation("flagfly");
anim.PlayRepeating("idle");
}