diff --git a/OpenRA.Mods.Common/Activities/Move/Move.cs b/OpenRA.Mods.Common/Activities/Move/Move.cs index 33d8b6b579..072d665194 100644 --- a/OpenRA.Mods.Common/Activities/Move/Move.cs +++ b/OpenRA.Mods.Common/Activities/Move/Move.cs @@ -225,6 +225,11 @@ namespace OpenRA.Mods.Common.Activities { path.Add(nextCell.Value.First); + // If Mobile.Info.AlwaysConsiderTurnAsMove is true, we consider Turn as movement regardless of facing delta size. + // IsMoving is then set back to false in Turn.OnLastRun. + // This is needed for actors that want to display their movement animation during turns (walker units, for example). + mobile.IsMoving = mobile.Info.AlwaysConsiderTurnAsMove; + // HACK: To fix visual hiccups on actors with move animations during "L-turn to next part of movement" transitions // or invisible mini-turns (due to less sprite facings than internal facings), we set IsMoving to 'true' during Turn activity // when the facing delta is low enough to be covered with a single Turn tick. diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 3adaa27067..d7c1bd96d9 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -35,6 +35,9 @@ namespace OpenRA.Mods.Common.Traits [Desc("Speed at which the actor turns.")] public readonly int TurnSpeed = 255; + [Desc("Should turning always be considering as moving (instead of only turning while moving forward).")] + public readonly bool AlwaysConsiderTurnAsMove = false; + public readonly int Speed = 1; public readonly string Cursor = "move";