remove trait lookup spam everywhere for IOccupySpace.

This commit is contained in:
Chris Forbes
2011-08-02 19:43:02 +12:00
parent aff3111eac
commit 663a323f29
11 changed files with 35 additions and 37 deletions

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Activities
if (target == null || !target.IsInWorld || target.IsDead()) return NextActivity;
if (target.Owner == self.Owner) 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;
// todo: clean this up