Fix Mobile.CurrentMovementType vertical handling

On bleed, the Horizontal flag is always returned on any position change,
even if that change is vertical-only.
This commit is contained in:
reaperrr
2019-04-04 20:29:36 +02:00
committed by reaperrr
parent 981fe6fae1
commit 5f6c8ba5d3

View File

@@ -224,9 +224,12 @@ namespace OpenRA.Mods.Common.Traits
void ITick.Tick(Actor self)
{
var newMovementTypes = MovementType.None;
if (oldPos != CenterPosition)
if ((oldPos - CenterPosition).HorizontalLengthSquared != 0)
newMovementTypes |= MovementType.Horizontal;
if (oldPos.Z != CenterPosition.Z)
newMovementTypes |= MovementType.Vertical;
if (oldFacing != Facing)
newMovementTypes |= MovementType.Turn;