fix infantry anims

This commit is contained in:
Bob
2010-09-22 13:32:58 +12:00
parent 96f72ce842
commit 8e589e3c16
4 changed files with 27 additions and 16 deletions

View File

@@ -30,10 +30,9 @@ namespace OpenRA.Mods.RA.Render
bool ChooseMoveAnim(Actor self)
{
if (!(self.GetCurrentActivity() is Move) && !(self.GetCurrentActivity() is Drag)) // A bit of a hack
return false;
var mobile = self.Trait<Mobile>();
if( !mobile.IsMoving ) return false;
if (float2.WithinEpsilon(self.CenterLocation, Util.CenterOfCell(mobile.toCell), 2)) return false;
var seq = IsProne(self) ? "crawl" : "run";