Bugfixes / Font changed / Zone tweaks

This commit is contained in:
Anuken
2019-03-08 19:07:23 -05:00
parent 3776b99c39
commit 64533de597
47 changed files with 1401 additions and 1482 deletions
@@ -280,7 +280,7 @@ public class BlockIndexer{
outer:
for(int x = quadrantX * structQuadrantSize; x < world.width() && x < (quadrantX + 1) * structQuadrantSize; x++){
for(int y = quadrantY * structQuadrantSize; y < world.height() && y < (quadrantY + 1) * structQuadrantSize; y++){
Tile result = world.tile(x, y);
Tile result = world.tile(x, y).target();
//when a targetable block is found, mark this quadrant as occupied and stop searching
if(result.entity != null && result.getTeam() == data.team){
structQuadrants[data.team.ordinal()].set(index);
@@ -146,6 +146,7 @@ public class Pathfinder{
while(path.frontier.size > 0 && (nsToRun < 0 || Time.timeSinceNanos(start) <= nsToRun)){
Tile tile = world.tile(path.frontier.removeLast());
if(tile == null || path.weights == null) return; //something went horribly wrong, bail
float cost = path.weights[tile.x][tile.y];
//pathfinding overflowed for some reason, time to bail. the next block update will handle this, hopefully