Path planning no longer considers moving friendly units as blockers.
This commit is contained in:
@@ -388,4 +388,23 @@ namespace OpenRA.Mods.RA.Move
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class ActorExtensionsForMove
|
||||
{
|
||||
public static bool IsMoving(this Actor self)
|
||||
{
|
||||
if (self.IsIdle) return false;
|
||||
|
||||
Activity a = self.GetCurrentActivity();
|
||||
Debug.Assert(a != null);
|
||||
|
||||
// Dirty, but it suffices until we do something better:
|
||||
if (a.GetType() == typeof(Move)) return true;
|
||||
if (a.GetType() == typeof(MoveAdjacentTo)) return true;
|
||||
if (a.GetType() == typeof(AttackMove)) return true;
|
||||
|
||||
// Not a move:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user