non-functional loading screen

This commit is contained in:
Anuken
2019-08-26 22:53:11 -04:00
parent 1fc9c82aaf
commit 76cd7ba8d1
211 changed files with 722 additions and 699 deletions
@@ -15,7 +15,7 @@ import io.anuke.mindustry.world.*;
import io.anuke.mindustry.world.blocks.*;
import io.anuke.mindustry.world.meta.*;
import static io.anuke.mindustry.Vars.*;
import static io.anuke.mindustry.Min.*;
/** Class used for indexing special target blocks for AI. */
@SuppressWarnings("unchecked")
@@ -24,7 +24,7 @@ public class BlockIndexer{
private final static int quadrantSize = 16;
/** Set of all ores that are being scanned. */
private final ObjectSet<Item> scanOres = ObjectSet.with(Item.getAllOres().toArray(Item.class));
private final ObjectSet<Item> scanOres = new ObjectSet<>();
private final ObjectSet<Item> itemSet = new ObjectSet<>();
/** Stores all ore quadtrants on the map. */
private ObjectMap<Item, ObjectSet<Tile>> ores;
@@ -57,6 +57,8 @@ public class BlockIndexer{
});
Events.on(WorldLoadEvent.class, event -> {
scanOres.clear();
scanOres.addAll(Item.getAllOres());
damagedTiles = new ObjectSet[Team.all.length];
flagMap = new ObjectSet[Team.all.length][BlockFlag.all.length];
@@ -16,8 +16,7 @@ import io.anuke.mindustry.world.Pos;
import io.anuke.mindustry.world.Tile;
import io.anuke.mindustry.world.meta.BlockFlag;
import static io.anuke.mindustry.Vars.state;
import static io.anuke.mindustry.Vars.world;
import static io.anuke.mindustry.Min.*;
public class Pathfinder{
private static final long maxUpdate = Time.millisToNanos(4);
@@ -117,7 +116,7 @@ public class Pathfinder{
path.lastSearchTime = Time.millis();
//add all targets to the frontier
for(Tile other : world.indexer.getEnemy(team, BlockFlag.target)){
for(Tile other : indexer.getEnemy(team, BlockFlag.target)){
path.weights[other.x][other.y] = 0;
path.searches[other.x][other.y] = (short)path.search;
path.frontier.addFirst(other.pos());
@@ -17,7 +17,7 @@ import io.anuke.mindustry.game.SpawnGroup;
import io.anuke.mindustry.net.Net;
import io.anuke.mindustry.world.Tile;
import static io.anuke.mindustry.Vars.*;
import static io.anuke.mindustry.Min.*;
public class WaveSpawner{
private static final float margin = 40f, coreMargin = tilesize * 3; //how far away from the edge flying units spawn