Remove a bunch of unused stuff. May help pathfinder perf a little.

This commit is contained in:
Paul Chote
2010-07-26 20:27:06 +12:00
parent c39116df84
commit 637fae87cd
8 changed files with 3 additions and 136 deletions

View File

@@ -54,13 +54,7 @@ namespace OpenRA.Traits
public override float MovementCostForCell(Actor self, int2 cell)
{
if (!self.World.Map.IsInMap(cell.X,cell.Y))
return float.PositiveInfinity;
var additionalCost = self.World.WorldActor.traits.WithInterface<ITerrainCost>()
.Select( t => t.GetTerrainCost(cell, self) ).Sum();
return additionalCost;
return (!self.World.Map.IsInMap(cell.X,cell.Y)) ? float.PositiveInfinity : 0;
}
public override float MovementSpeedForCell(Actor self, int2 cell)