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

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.RA.Move
cellInfo[p.Location.X, p.Location.Y].Seen = true;
var thisCost = Mobile.MovementCostForCell(mobileInfo, world, p.Location);
var thisCost = mobileInfo.MovementCostForCell(world, p.Location);
if (thisCost == int.MaxValue)
return p.Location;
@@ -100,12 +100,12 @@ namespace OpenRA.Mods.RA.Move
if( cellInfo[ newHere.X, newHere.Y ].Seen )
continue;
var costHere = Mobile.MovementCostForCell(mobileInfo, world, newHere);
var costHere = mobileInfo.MovementCostForCell(world, newHere);
if (costHere == int.MaxValue)
continue;
if (!Mobile.CanEnterCell(mobileInfo, world, uim, newHere, ignoreBuilding, checkForBlocked))
if (!mobileInfo.CanEnterCell(world, uim, newHere, ignoreBuilding, checkForBlocked))
continue;
if (customBlock != null && customBlock(newHere))