Fixed server fog not being cleared by blocks

This commit is contained in:
Anuken
2018-07-27 20:18:04 -04:00
parent 0875c29da5
commit 3a3b81941b

View File

@@ -53,6 +53,15 @@ public class FogRenderer implements Disposable{
Graphics.clear(0, 0, 0, 1f);
buffer.end();
for(int x = 0; x < world.width(); x++){
for(int y = 0; y < world.height(); y++){
Tile tile = world.tile(x, y);
if(tile.getTeam() == players[0].getTeam() && tile.block().synthetic() && tile.block().viewRange > 0){
changeQueue.add(tile);
}
}
}
pixelBuffer = ByteBuffer.allocateDirect(world.width() * world.height() * 3);
dirty = true;
});