less perf fail in jams

This commit is contained in:
Chris Forbes
2009-11-06 23:12:24 +13:00
parent c174e65437
commit 701adda6f3
4 changed files with 56 additions and 32 deletions

View File

@@ -77,7 +77,7 @@ namespace OpenRa.Game.Traits.Activities
var path = Game.PathFinder.FindUnitPath( self.Location, loc =>
{
if( Game.UnitInfluence.GetUnitAt( loc ) != null ) return double.PositiveInfinity;
if( Game.UnitInfluence.GetUnitAt( loc ) != null ) return float.PositiveInfinity;
return Game.map.ContainsResource( loc ) ? 0 : 1;
}, UnitMovementType.Wheel )
.TakeWhile( a => a != self.Location )