Remove ActorExtensionsForMove
And use IMove.IsMoving instead.
This commit is contained in:
@@ -179,14 +179,14 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
static bool IsMovingInMyDirection(Actor self, Actor other)
|
||||
{
|
||||
if (!other.IsMoving()) return false;
|
||||
|
||||
var selfMobile = self.TraitOrDefault<Mobile>();
|
||||
if (selfMobile == null) return false;
|
||||
|
||||
var otherMobile = other.TraitOrDefault<Mobile>();
|
||||
if (otherMobile == null) return false;
|
||||
|
||||
if (!otherMobile.IsMoving) return false;
|
||||
|
||||
// Sign of dot-product indicates (roughly) if vectors are facing in same or opposite directions:
|
||||
var dp = CVec.Dot(selfMobile.ToCell - self.Location, otherMobile.ToCell - other.Location);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user