From 5f6c8ba5d36cbd11f59fecdc2f1288fc3b072bd3 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 4 Apr 2019 20:29:36 +0200 Subject: [PATCH] Fix Mobile.CurrentMovementType vertical handling On bleed, the Horizontal flag is always returned on any position change, even if that change is vertical-only. --- OpenRA.Mods.Common/Traits/Mobile.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 6a3fe57b28..4aabf79a76 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -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;