move some MobileInfo-related bits onto MobileInfo

This commit is contained in:
Chris Forbes
2010-12-27 18:41:07 +13:00
parent 31b98c0eb4
commit 9d768fa1c1
5 changed files with 337 additions and 330 deletions

View File

@@ -63,7 +63,7 @@ namespace OpenRA.Mods.RA.Crates
var mi = Rules.Info[Info.Unit].Traits.GetOrDefault<MobileInfo>();
for (var i = -1; i < 2; i++)
for (var j = -1; j < 2; j++)
if (Mobile.CanEnterCell(self.World, mi, near + new int2(i, j), null, true))
if (mi.CanEnterCell(self.World, near + new int2(i, j), null, true))
yield return near + new int2(i, j);
}