Various harvesting fixes.

This commit is contained in:
Bob
2009-11-12 11:38:28 +13:00
parent 39a7b01f4a
commit efb200c16c
4 changed files with 56 additions and 55 deletions

View File

@@ -130,7 +130,10 @@ namespace OpenRa.Game
return MakeBidiPath(fromSrc, fromDest, p);
/* make some progress on the second search */
fromDest.Expand( passableCost );
var q = fromDest.Expand( passableCost );
if (fromSrc.cellInfo[q.X, q.Y].Seen && fromSrc.cellInfo[q.X, q.Y].MinCost < float.PositiveInfinity)
return MakeBidiPath(fromSrc, fromDest, q);
}
return new List<int2>();