Skip to content

Commit

Permalink
Pathfinder optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jaros-arion committed Aug 12, 2020
1 parent 32216f7 commit 62ac0f9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions BonVoyage/PathFinder/PathFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ internal enum TileTypes
/// Hexagonal grid for pathfinding will be used
/// https://tbswithunity3d.wordpress.com/2012/02/23/hexagonal-grid-path-finding-using-a-algorithm/
/// </summary>

internal class PathFinder
{
internal const double StepSize = 1000;
Expand Down Expand Up @@ -138,9 +137,9 @@ internal IEnumerable<Hex> GetNeighbours(int x, int y, bool passable = true)
newBearing = (newBearing - direction.Key + 360) % 360;
double altitude = GeoUtils.TerrainHeightAt(coords[0], coords[1], mainBody);
neighbour = new Hex(coords[0], coords[1], altitude, newBearing, tile.X + dirX, tile.Y + dirY, this);
tiles.Add(neighbour);
}
neighbours.Add(neighbour);
tiles.Add(neighbour);
}
if (passable)
{
Expand Down
Binary file modified GameData/BonVoyage/Plugins/BonVoyage.dll
Binary file not shown.

0 comments on commit 62ac0f9

Please sign in to comment.