mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-02-05 01:45:00 +01:00
Optimize navigation refresh
This commit is contained in:
parent
67ebc8a2c6
commit
57fbe3cb48
2 changed files with 4 additions and 6 deletions
|
@ -443,7 +443,7 @@ public class Navigation {
|
|||
TrackGraph graph = train.graph;
|
||||
if (graph == null)
|
||||
return null;
|
||||
LogUtils.getLogger().info("finding path");
|
||||
|
||||
Couple<DiscoveredPath> results = Couple.create(null, null);
|
||||
for (boolean forward : Iterate.trueAndFalse) {
|
||||
|
||||
|
|
|
@ -541,14 +541,12 @@ public class Train {
|
|||
if (!reservedSignalBlocks.isEmpty())
|
||||
return;
|
||||
|
||||
GlobalStation destination = navigation.destination;
|
||||
if (!navigatingManually && fullRefresh) {
|
||||
DiscoveredPath preferredPath = runtime.startCurrentInstruction();
|
||||
if (preferredPath != null)
|
||||
destination = preferredPath.destination;
|
||||
if (preferredPath != null){
|
||||
navigation.startNavigation(preferredPath);
|
||||
}
|
||||
}
|
||||
|
||||
navigation.startNavigation(navigation.findPathTo(destination, navigatingManually ? -1 : Double.MAX_VALUE));
|
||||
}
|
||||
|
||||
private void tickDerailedSlowdown() {
|
||||
|
|
Loading…
Reference in a new issue