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:
@@ -404,8 +404,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
bool ReturnToGroundLayerOnIdle { get; }
|
||||
|
||||
bool EnabledForLocomotor(LocomotorInfo li);
|
||||
int EntryMovementCost(LocomotorInfo li, CPos cell);
|
||||
int ExitMovementCost(LocomotorInfo li, CPos cell);
|
||||
short EntryMovementCost(LocomotorInfo li, CPos cell);
|
||||
short ExitMovementCost(LocomotorInfo li, CPos cell);
|
||||
|
||||
byte GetTerrainIndex(CPos cell);
|
||||
WPos CenterOfCell(CPos cell);
|
||||
|
||||
Reference in New Issue
Block a user