#87 fixed
This commit is contained in:
@@ -93,5 +93,7 @@ namespace OpenRa.Game.Traits
|
|||||||
if (move == null || move.path == null) return new int2[] { };
|
if (move == null || move.path == null) return new int2[] { };
|
||||||
return Enumerable.Reverse(move.path);
|
return Enumerable.Reverse(move.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool HasActivity { get { return currentActivity != null; } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ namespace OpenRa.Game.Traits
|
|||||||
rotorAnim.Tick();
|
rotorAnim.Tick();
|
||||||
if (secondRotorAnim != null)
|
if (secondRotorAnim != null)
|
||||||
secondRotorAnim.Tick();
|
secondRotorAnim.Tick();
|
||||||
|
|
||||||
|
var mobile = self.traits.Get<Mobile>();
|
||||||
|
var isFlying = mobile.HasActivity;
|
||||||
|
if (isFlying ^ (rotorAnim.CurrentSequence.Name != "rotor"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
rotorAnim.PlayRepeatingPreservingPosition(isFlying ? "rotor" : "slow-rotor");
|
||||||
|
if (secondRotorAnim != null)
|
||||||
|
secondRotorAnim.PlayRepeatingPreservingPosition(isFlying ? "rotor2" : "slow-rotor2");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user