Add AlwaysConsiderTurnAsMove plumbing to Mobile
Can be used to make walker units like the TS mechs display move animations while turning on the spot.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user