diff --git a/OpenRA.Mods.Cnc/Activities/Leap.cs b/OpenRA.Mods.Cnc/Activities/Leap.cs index 7e2a2acbe0..54455f8657 100644 --- a/OpenRA.Mods.Cnc/Activities/Leap.cs +++ b/OpenRA.Mods.Cnc/Activities/Leap.cs @@ -92,6 +92,10 @@ namespace OpenRA.Mods.Cnc.Activities // (This does not update the visual position!) mobile.SetLocation(destinationCell, destinationSubCell, destinationCell, destinationSubCell); + // Update movement which results in movementType set to MovementType.None. + // This is needed to prevent the move animation from playing. + mobile.UpdateMovement(self); + // Revoke the condition before attacking, as it is usually used to pause the attack trait attack.RevokeLeapCondition(self); attack.DoAttack(self, target); diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index c38441fb2f..10b2db855f 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -255,6 +255,11 @@ namespace OpenRA.Mods.Common.Traits } void ITick.Tick(Actor self) + { + UpdateMovement(self); + } + + public void UpdateMovement(Actor self) { var newMovementTypes = MovementType.None; if ((oldPos - CenterPosition).HorizontalLengthSquared != 0)