world renderer: view distance change: check for view distance to unload

* This fixes a lot of missing chunks bugs
This commit is contained in:
Bixilon 2022-08-16 20:25:14 +02:00
parent 34f95089b6
commit 947e09e63b
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -288,7 +288,7 @@ class WorldRenderer(
val loadedMeshesToRemove: MutableSet<Vec2i> = HashSet()
for ((chunkPosition, sections) in loadedMeshes) {
if (visibilityGraph.isChunkVisible(chunkPosition)) {
if (visibilityGraph.isInViewDistance(chunkPosition)) {
continue
}
loadedMeshesToRemove += chunkPosition