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

@@ -132,7 +132,7 @@ namespace OpenRA.Traits
public static IEnumerable<int2> GetVisOrigins(Actor a)
{
var ios = a.TraitOrDefault<IOccupySpace>();
var ios = a.OccupiesSpace;
if (ios != null)
{
var cells = ios.OccupiedCells();