Add plumbing for notifying traits of movement

More precisely, about start and stop of movement.
This commit is contained in:
reaperrr
2018-08-26 13:49:23 +02:00
committed by Paul Chote
parent 32ab822786
commit a10af382b4
15 changed files with 102 additions and 84 deletions

View File

@@ -223,7 +223,7 @@ namespace OpenRA.Mods.Common.Traits
static bool IsMovingInMyDirection(Actor self, Actor other)
{
var otherMobile = other.TraitOrDefault<Mobile>();
if (otherMobile == null || !otherMobile.IsMoving)
if (otherMobile == null || !otherMobile.CurrentMovementTypes.HasFlag(MovementType.Horizontal))
return false;
var selfMobile = self.TraitOrDefault<Mobile>();