Cache TargetablePositions in Actor
To speed up Target.Positions.
This commit is contained in:
@@ -73,6 +73,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
base.Created(self);
|
||||
}
|
||||
|
||||
bool ITargetablePositions.AlwaysEnabled { get { return Info.RequiresCondition == null; } }
|
||||
|
||||
IEnumerable<WPos> ITargetablePositions.TargetablePositions(Actor self)
|
||||
{
|
||||
if (IsTraitDisabled)
|
||||
|
||||
@@ -334,8 +334,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
IEnumerable<object> ActorPreviewInits(ActorInfo ai, ActorPreviewType type);
|
||||
}
|
||||
|
||||
public interface IMoveInfo : ITraitInfoInterface { }
|
||||
|
||||
public interface IMove
|
||||
{
|
||||
Activity MoveTo(CPos cell, int nearEnough);
|
||||
|
||||
Reference in New Issue
Block a user