Use named pathfinding constants.
- Rename CostForInvalidCell to PathCostForInvalidPath - Add MovementCostForUnreachableCell - Update usages of int.MaxValue and short.Maxvalue to use named constants where relevant. - Update costs on ICustomMovementLayer to return short, for consistency with costs from Locomotor. - Rename some methods to distinguish between path/movement cost.
This commit is contained in:
@@ -191,7 +191,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
.WithCustomCost(loc =>
|
||||
{
|
||||
if ((loc - searchFromLoc).LengthSquared > searchRadiusSquared)
|
||||
return PathGraph.CostForInvalidCell;
|
||||
return PathGraph.PathCostForInvalidPath;
|
||||
|
||||
// Add a cost modifier to harvestable cells to prefer resources that are closer to the refinery.
|
||||
// This reduces the tendancy for harvesters to move in straight lines
|
||||
|
||||
Reference in New Issue
Block a user