This commit is contained in:
Chris Forbes
2009-11-09 18:33:31 +13:00
parent 40bad1b813
commit 7d19741dd9

View File

@@ -49,7 +49,13 @@ namespace OpenRa.Game
if (Projectile.Image != null && Projectile.Image != "none")
{
anim = new Animation(Projectile.Image);
anim.PlayRepeating("idle");
if (Projectile.Rotates)
anim.PlayFetchIndex("idle",
() => Traits.Util.QuantizeFacing(
Traits.Util.GetFacing((dest - src).ToFloat2(), 0),
anim.CurrentSequence.Length));
else
anim.PlayRepeating("idle");
}
}