#67 fixed: spinners work again

This commit is contained in:
Chris Forbes
2009-11-01 22:30:28 +13:00
parent 33ef0f6e61
commit e62a0bc717
4 changed files with 16 additions and 4 deletions

View File

@@ -16,7 +16,11 @@ namespace OpenRa.Game.Traits
: base(self)
{
turretAnim = new Animation(self.unitInfo.Name);
turretAnim.PlayFetchIndex("turret", () => self.traits.Get<Turreted>().turretFacing / 8);
if (self.traits.Contains<Turreted>())
turretAnim.PlayFetchIndex("turret",
() => self.traits.Get<Turreted>().turretFacing / 8);
else
turretAnim.PlayRepeating("turret"); /* not really a turret; it's a spinner */
}
public override IEnumerable<Pair<Sprite, float2>> Render(Actor self)