Better stell cell

This commit is contained in:
Anuken
2022-02-17 13:42:17 -05:00
parent f9eabecd88
commit ba475b681c
7 changed files with 27 additions and 8 deletions

View File

@@ -266,6 +266,8 @@ public class ControlPathfinder{
private void start(){
stop();
if(net.client()) return;
//TODO currently capped at 6 threads, might be a good idea to make it more?
threads = new PathfindThread[Mathf.clamp(Runtime.getRuntime().availableProcessors() - 2, 1, 6)];
for(int i = 0; i < threads.length; i ++){

View File

@@ -149,6 +149,8 @@ public class Pathfinder implements Runnable{
/** Starts or restarts the pathfinding thread. */
private void start(){
stop();
if(net.client()) return;
thread = Threads.daemon("Pathfinder", this);
}