Cache TargetablePositions in Actor

To speed up Target.Positions.
This commit is contained in:
reaperrr
2018-03-14 01:48:24 +01:00
committed by Paul Chote
parent 4c16e51f92
commit 0c52ff3ae5
5 changed files with 29 additions and 10 deletions

View File

@@ -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)