Helicopters use pathfinder

This commit is contained in:
Paul Chote
2010-06-24 21:44:30 +12:00
parent 37cf30a097
commit 0aeca2aadc
12 changed files with 75 additions and 53 deletions

View File

@@ -44,8 +44,8 @@ namespace OpenRA.Traits
public class ResourceType
{
public ResourceTypeInfo info;
float[] movementSpeed = new float[4];
float[] pathCost = new float[4];
float[] movementSpeed = new float[5];
float[] pathCost = new float[5];
public ResourceType(ResourceTypeInfo info)
{
@@ -56,6 +56,8 @@ namespace OpenRA.Traits
pathCost[(int)umt] = (info.PathingTerrainType != null) ? (float)Rules.TerrainTypes[TerrainType.Ore].GetCost(umt)
: (info.MovementTerrainType != null) ? (float)Rules.TerrainTypes[TerrainType.Ore].GetCost(umt) : 1.0f;
}
movementSpeed[(int)UnitMovementType.Fly] = 1.0f;
pathCost[(int)UnitMovementType.Fly] = 1.0f;
this.info = info;
}