heli flight sortof ok

This commit is contained in:
Chris Forbes
2009-11-23 21:05:51 +13:00
parent c7e95c71b2
commit 7ccb2aa9ee
8 changed files with 112 additions and 29 deletions

View File

@@ -18,9 +18,12 @@ namespace OpenRa.Game.Traits
void PlayFacingAnim(Actor self)
{
var mobile = self.traits.GetOrDefault<Mobile>();
var heli = self.traits.GetOrDefault<Helicopter>();
anim.PlayFetchIndex("idle",
() => Util.QuantizeFacing(
self.traits.Get<Mobile>().facing,
mobile != null ? mobile.facing : heli.facing,
anim.CurrentSequence.Length ));
}