This commit is contained in:
Anuken
2019-09-25 13:51:23 -04:00
parent 04cfec3213
commit 5ac7fa5eca
3 changed files with 20 additions and 22 deletions

View File

@@ -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 //special preset which may help speed things up; this is optional
preloadPath(waveTeam, PathTarget.enemyCores); preloadPath(waveTeam, PathTarget.enemyCores);
});
start(); start();
}); });
@@ -121,6 +118,7 @@ public class Pathfinder implements Runnable{
public void run(){ public void run(){
while(true){ while(true){
if(net.client()) return; if(net.client()) return;
try{
queue.run(); queue.run();
@@ -135,6 +133,9 @@ public class Pathfinder implements Runnable{
//stop looping when interrupted externally //stop looping when interrupted externally
return; return;
} }
}catch(Exception e){
e.printStackTrace();
}
} }
} }

View File

@@ -133,7 +133,7 @@ public class NetClient implements ApplicationListener{
//called on all clients //called on all clients
@Remote(called = Loc.server, targets = Loc.server, variants = Variant.both) @Remote(called = Loc.server, targets = Loc.server, variants = Variant.both)
public static void sendMessage(String message, String sender, Player playersender){ 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); Vars.ui.chatfrag.addMessage(message, sender);
} }

View File

@@ -38,11 +38,8 @@ public abstract class FlyingUnit extends BaseUnit{
if(target == null) targetClosestEnemyFlag(BlockFlag.turret); if(target == null) targetClosestEnemyFlag(BlockFlag.turret);
} }
if(target == null){ if(getClosestSpawner() == null && getSpawner() != null){
target = getSpawner(); target = getSpawner();
}
if(target == getSpawner() && getSpawner() != null){
circle(80f + Mathf.randomSeed(id) * 120); circle(80f + Mathf.randomSeed(id) * 120);
}else if(target != null){ }else if(target != null){
attack(type.attackLength); attack(type.attackLength);