Skip to content

Commit

Permalink
Version 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jaros-arion committed Aug 12, 2020
1 parent 62ac0f9 commit 93cad2c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
7 changes: 6 additions & 1 deletion BonVoyage/PathFinder/Path.cs
Expand Up @@ -60,10 +60,13 @@ IEnumerator IEnumerable.GetEnumerator()
)
where Node : IHasNeighbours<Node>
{
double timeout = Configuration.PathfinderTimer;
DateTime startedAt = DateTime.Now;

var closed = new HashSet<Node>();
var queue = new PriorityQueue<double, Path<Node>>();
queue.Enqueue(0, new Path<Node>(start));

while (!queue.IsEmpty)
{
var path = queue.Dequeue();
Expand All @@ -72,13 +75,15 @@ IEnumerator IEnumerable.GetEnumerator()
if (path.LastStep.Equals(destination))
return path;
closed.Add(path.LastStep);

foreach (Node n in path.LastStep.Neighbours)
{
double d = distance(path.LastStep, n);
var newPath = path.AddStep(n, d);
queue.Enqueue(newPath.TotalCost + estimate(n), newPath);
}
if (startedAt.AddSeconds(10) < DateTime.Now)

if (startedAt.AddSeconds(timeout) < DateTime.Now)
return null;
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion BonVoyage/Properties/AssemblyInfo.cs
Expand Up @@ -16,7 +16,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.1.1.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Binary file modified GameData/BonVoyage/Plugins/BonVoyage.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GameData/BonVoyage/Versioning/BonVoyage.version
Expand Up @@ -11,7 +11,7 @@
{
"MAJOR" : 1,
"MINOR" : 1,
"PATCH" : 0,
"PATCH" : 1,
"BUILD" : 0
},
"KSP_VERSION" :
Expand Down
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -2,11 +2,17 @@
Automagic Industries brings you a new autopilot, which reduces driving accidents by 100%.

# Changelog
## 1.1.1 - New path
### Changes
- Pathfinder optimization - it's quicker :)
- New configuration value for pathfinding timeout was added. Default value is 10 seconds. You can change it in config.xml of BonVoyage by changing the value on this line: <double name="pathfinderTimer">10</double>


## 1.1.0
### Changes
- Kerbalism compatibility
- Critter Crawler compatibility
- Added the option to show biome info in the map view on or off. Off by default.
- Added the option to show biome info in the map view. Off by default.
- KSP 1.9.1 compatibility

### Fixes
Expand Down

0 comments on commit 93cad2c

Please sign in to comment.