mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-09 20:29:06 +07:00
Bugfixes
This commit is contained in:
parent
04cfec3213
commit
5ac7fa5eca
@ -50,11 +50,8 @@ public class Pathfinder implements Runnable{
|
||||
}
|
||||
}
|
||||
|
||||
//run next frame to try and prevent a crash
|
||||
Core.app.post(() -> {
|
||||
//special preset which may help speed things up; this is optional
|
||||
preloadPath(waveTeam, PathTarget.enemyCores);
|
||||
});
|
||||
//special preset which may help speed things up; this is optional
|
||||
preloadPath(waveTeam, PathTarget.enemyCores);
|
||||
|
||||
start();
|
||||
});
|
||||
@ -121,19 +118,23 @@ public class Pathfinder implements Runnable{
|
||||
public void run(){
|
||||
while(true){
|
||||
if(net.client()) return;
|
||||
|
||||
queue.run();
|
||||
|
||||
//total update time no longer than maxUpdate
|
||||
for(PathData data : list){
|
||||
updateFrontier(data, maxUpdate / list.size);
|
||||
}
|
||||
|
||||
try{
|
||||
Thread.sleep(updateInterval);
|
||||
}catch(InterruptedException e){
|
||||
//stop looping when interrupted externally
|
||||
return;
|
||||
|
||||
queue.run();
|
||||
|
||||
//total update time no longer than maxUpdate
|
||||
for(PathData data : list){
|
||||
updateFrontier(data, maxUpdate / list.size);
|
||||
}
|
||||
|
||||
try{
|
||||
Thread.sleep(updateInterval);
|
||||
}catch(InterruptedException e){
|
||||
//stop looping when interrupted externally
|
||||
return;
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ public class NetClient implements ApplicationListener{
|
||||
//called on all clients
|
||||
@Remote(called = Loc.server, targets = Loc.server, variants = Variant.both)
|
||||
public static void sendMessage(String message, String sender, Player playersender){
|
||||
if(Vars.ui != null){
|
||||
if(Vars.ui != null && !(playersender != null && net.server() && sender.startsWith("[#" + player.getTeam().color.toString() + "]<T>"))){
|
||||
Vars.ui.chatfrag.addMessage(message, sender);
|
||||
}
|
||||
|
||||
|
@ -38,11 +38,8 @@ public abstract class FlyingUnit extends BaseUnit{
|
||||
if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
|
||||
}
|
||||
|
||||
if(target == null){
|
||||
if(getClosestSpawner() == null && getSpawner() != null){
|
||||
target = getSpawner();
|
||||
}
|
||||
|
||||
if(target == getSpawner() && getSpawner() != null){
|
||||
circle(80f + Mathf.randomSeed(id) * 120);
|
||||
}else if(target != null){
|
||||
attack(type.attackLength);
|
||||
|
Loading…
Reference in New Issue
Block a user