remove trait lookup spam everywhere for IOccupySpace.
This commit is contained in:
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
{
|
||||
if (IsCanceled) return NextActivity;
|
||||
if (target == null || !target.IsInWorld || target.IsDead()) return NextActivity;
|
||||
if( !target.Trait<IOccupySpace>().OccupiedCells().Any( x => x.First == self.Location ) )
|
||||
if( !target.OccupiesSpace.OccupiedCells().Any( x => x.First == self.Location ) )
|
||||
return NextActivity;
|
||||
|
||||
var health = target.Trait<Health>();
|
||||
|
||||
Reference in New Issue
Block a user