Launch sector description

This commit is contained in:
Anuken
2022-04-20 14:15:23 -04:00
parent 6441d0b2d5
commit f1c6b6f949
5 changed files with 13 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ import static mindustry.ai.Pathfinder.*;
public class ControlPathfinder{
//TODO this FPS-based update system could be flawed.
private static final long maxUpdate = Time.millisToNanos(20);
private static final long maxUpdate = Time.millisToNanos(30);
private static final int updateFPS = 60;
private static final int updateInterval = 1000 / updateFPS;
private static final int wallImpassableCap = 100_000;
@@ -272,6 +272,7 @@ public class ControlPathfinder{
threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 6)];
for(int i = 0; i < threads.length; i ++){
threads[i] = new PathfindThread("ControlPathfindThread-" + i);
threads[i].setPriority(Thread.MIN_PRIORITY);
threads[i].setDaemon(true);
threads[i].start();
}

View File

@@ -19,7 +19,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*;
public class Pathfinder implements Runnable{
private static final long maxUpdate = Time.millisToNanos(5);
private static final long maxUpdate = Time.millisToNanos(7);
private static final int updateFPS = 60;
private static final int updateInterval = 1000 / updateFPS;
@@ -197,7 +197,10 @@ public class Pathfinder implements Runnable{
stop();
if(net.client()) return;
thread = Threads.daemon("Pathfinder", this);
thread = new Thread(this, "Pathfinder");
thread.setPriority(Thread.MIN_PRIORITY);
thread.setDaemon(true);
thread.start();
}
/** Stops the pathfinding thread. */