Files
OpenRA/OpenRA.Mods.Common/Pathfinder/Constants.cs
David Jiménez 787609d51e Improved the performance and intelligence of resource harvesting by
refactoring the Harvesters' pathfinding. Now they in first place assess
which is the closest resource inside their search area and then a path is
calculated

Changed the way harvesters find resources by always trying to find the
closest resource to their refinery.

Changed the strategy of finding to find resources in Annulus.
2015-07-22 02:31:26 +02:00

32 lines
986 B
C#

#region Copyright & License Information
/*
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Mods.Common.Pathfinder
{
public static class Constants
{
/// <summary>
/// Min cost to arrive from once cell to an adjacent one
/// (125 according to runtime tests where we could assess the cost
/// a unit took to move one cell horizontally)
/// </summary>
public const int CellCost = 125;
/// <summary>
/// Min cost to arrive from once cell to a diagonal adjacent one
/// (125 * Sqrt(2) according to runtime tests where we could assess the cost
/// a unit took to move one cell diagonally)
/// </summary>
public const int DiagonalCellCost = 177;
public const int InvalidNode = int.MaxValue;
}
}