mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 23:42:35 -04:00
chunk mesher: only remove from meshing queue if meshed
If it was interrupted it might not restart the meshing. That probably solves the "sometimes missing chunk" bug.
This commit is contained in:
parent
f0db36c80b
commit
dd9aee9c21
@ -68,11 +68,11 @@ class ChunkMesher(
|
||||
fun tryMesh(item: WorldQueueItem, task: MeshPrepareTask, runnable: InterruptableRunnable) {
|
||||
try {
|
||||
mesh(item, runnable)
|
||||
renderer.meshingQueue.tasks -= task
|
||||
} catch (ignored: InterruptedException) {
|
||||
} finally {
|
||||
task.runnable.interruptable = false
|
||||
if (Thread.interrupted()) throw InterruptedException()
|
||||
renderer.meshingQueue.tasks -= task
|
||||
Thread.interrupted() // clear interrupted flag
|
||||
renderer.meshingQueue.work()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user