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:
@@ -224,9 +224,12 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
void ITick.Tick(Actor self)
|
void ITick.Tick(Actor self)
|
||||||
{
|
{
|
||||||
var newMovementTypes = MovementType.None;
|
var newMovementTypes = MovementType.None;
|
||||||
if (oldPos != CenterPosition)
|
if ((oldPos - CenterPosition).HorizontalLengthSquared != 0)
|
||||||
newMovementTypes |= MovementType.Horizontal;
|
newMovementTypes |= MovementType.Horizontal;
|
||||||
|
|
||||||
|
if (oldPos.Z != CenterPosition.Z)
|
||||||
|
newMovementTypes |= MovementType.Vertical;
|
||||||
|
|
||||||
if (oldFacing != Facing)
|
if (oldFacing != Facing)
|
||||||
newMovementTypes |= MovementType.Turn;
|
newMovementTypes |= MovementType.Turn;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user