Fixed privileged blocks being "built" on landing

This commit is contained in:
Anuken
2022-04-17 20:06:08 -04:00
parent 224b1b022a
commit f21f649387
3 changed files with 4 additions and 2 deletions

View File

@@ -98,10 +98,12 @@ public class Pathfinder implements Runnable{
//don't bother setting up paths unless necessary //don't bother setting up paths unless necessary
if(state.rules.waveTeam.needsFlowField() && !net.client()){ if(state.rules.waveTeam.needsFlowField() && !net.client()){
preloadPath(getField(state.rules.waveTeam, costGround, fieldCore)); preloadPath(getField(state.rules.waveTeam, costGround, fieldCore));
Log.debug("Preloading ground enemy flowfield.");
//preload water on naval maps //preload water on naval maps
if(spawner.getSpawns().contains(t -> t.floor().isLiquid)){ if(spawner.getSpawns().contains(t -> t.floor().isLiquid)){
preloadPath(getField(state.rules.waveTeam, costNaval, fieldCore)); preloadPath(getField(state.rules.waveTeam, costNaval, fieldCore));
Log.debug("Preloading naval enemy flowfield.");
} }
} }

View File

@@ -217,7 +217,7 @@ public class Control implements ApplicationListener, Loadable{
boolean anyBuilds = false; boolean anyBuilds = false;
for(var build : state.rules.defaultTeam.data().buildings){ for(var build : state.rules.defaultTeam.data().buildings){
if(!(build instanceof CoreBuild)){ if(!(build instanceof CoreBuild) && !build.block.privileged){
var ccore = build.closestCore(); var ccore = build.closestCore();
if(ccore != null && build.within(ccore, state.rules.enemyCoreBuildRadius)){ if(ccore != null && build.within(ccore, state.rules.enemyCoreBuildRadius)){

View File

@@ -385,7 +385,7 @@ public class FloorRenderer{
} }
} }
Log.debug("Time to cache: @", Time.elapsed()); Log.debug("Generated world mesh: @ms", Time.elapsed());
} }
} }