fix bad visibility graph

This commit is contained in:
Bixilon 2022-09-17 00:11:06 +02:00
parent e47e60191d
commit 1d89404d20
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -218,7 +218,7 @@ class WorldVisibilityGraph(
}
private fun VisibilityGraph.checkSection(chunkPosition: Vec2i, sectionIndex: Int, chunk: Chunk, visibilities: BooleanArray, direction: Directions, directionX: Int, directionY: Int, directionZ: Int, ignoreVisibility: Boolean) {
if ((direction == Directions.UP && sectionIndex >= maxIndex) || (direction == Directions.DOWN && sectionIndex <= 0)) {
if ((direction == Directions.UP && sectionIndex >= maxIndex) || (direction == Directions.DOWN && sectionIndex < 0)) {
return
}
if (!isInViewDistance(chunkPosition)) {