Fixed block targeting bug

This commit is contained in:
Anuken
2018-08-15 18:18:57 -04:00
parent 36c01fde94
commit d58cc18136
5 changed files with 16 additions and 9 deletions
@@ -142,7 +142,7 @@ public class BlockIndexer{
for(int ty = ry * structQuadrantSize; ty < (ry + 1) * structQuadrantSize && ty < world.height(); ty++){
Tile other = world.tile(tx, ty);
if(other == null || other.entity == null || !pred.test(other)) continue;
if(other == null || other.entity == null || other.getTeam() != team || !pred.test(other)) continue;
TileEntity e = other.entity;
@@ -246,7 +246,6 @@ public class BlockIndexer{
int quadrantX = tile.x / structQuadrantSize;
int quadrantY = tile.y / structQuadrantSize;
int index = quadrantX + quadrantY * quadWidth();
//Log.info("Updating quadrant: {0} {1}", quadrantX, quadrantY);
for(TeamData data : state.teams.getTeams()){