Add plumbing for notifying traits of movement
More precisely, about start and stop of movement.
This commit is contained in:
@@ -140,12 +140,12 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
wasModifying = rsm.IsModifyingSequence;
|
||||
}
|
||||
|
||||
if ((state != AnimationState.Moving || dirty) && move.IsMoving)
|
||||
if ((state != AnimationState.Moving || dirty) && move.CurrentMovementTypes.HasFlag(MovementType.Horizontal))
|
||||
{
|
||||
state = AnimationState.Moving;
|
||||
DefaultAnimation.PlayRepeating(NormalizeInfantrySequence(self, Info.MoveSequence));
|
||||
}
|
||||
else if (((state == AnimationState.Moving || dirty) && !move.IsMoving)
|
||||
else if (((state == AnimationState.Moving || dirty) && !move.CurrentMovementTypes.HasFlag(MovementType.Horizontal))
|
||||
|| ((state == AnimationState.Idle || state == AnimationState.IdleAnimating) && !self.IsIdle))
|
||||
PlayStandAnimation(self);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user