This commit is contained in:
Anuken
2020-11-29 13:59:09 -05:00
parent 682c1692df
commit 2a9f362e15
4 changed files with 13 additions and 6 deletions
+3 -2
View File
@@ -13,6 +13,7 @@ import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
@@ -115,7 +116,7 @@ public class Pathfinder implements Runnable{
}
return PathTile.get(
tile.build == null || !tile.solid() ? 0 : Math.min((int)(tile.build.health / 40), 80),
tile.build == null || !tile.solid() || tile.block() instanceof CoreBlock ? 0 : Math.min((int)(tile.build.health / 40), 80),
tile.getTeamID(),
tile.solid(),
tile.floor().isLiquid,
@@ -458,7 +459,7 @@ public class Pathfinder implements Runnable{
/** costs of getting to a specific tile */
public int[][] weights;
/** search IDs of each position - the highest, most recent search is prioritized and overwritten */
int[][] searches;
public int[][] searches;
/** search frontier, these are Pos objects */
IntQueue frontier = new IntQueue();
/** all target positions; these positions have a cost of 0, and must be synchronized on! */