This commit is contained in:
Chris Forbes
2010-01-11 19:07:22 +13:00
parent 21bf3cd0e1
commit 5faa1ea724
9 changed files with 20 additions and 14 deletions

View File

@@ -339,7 +339,7 @@ namespace OpenRa.Game
heuristic = loc =>
{
var b = Game.BuildingInfluence.GetBuildingAt(loc);
if (b != null && b.Owner == p && (b.LegacyInfo as LegacyBuildingInfo).BaseNormal) return 0;
if (b != null && b.Owner == p && b.Info.Traits.Get<BuildingInfo>().BaseNormal) return 0;
if ((loc - position).Length > maxDistance)
return float.PositiveInfinity; /* not quite right */
return 1;