mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
entities renderer: add on rendering thread
That fixes/workarounds deadlocks
This commit is contained in:
parent
c13f2f3445
commit
28abad23c3
@ -38,11 +38,13 @@ class EntityRendererManager(val renderer: EntitiesRenderer) : Iterable<EntityRen
|
|||||||
|
|
||||||
fun init() {
|
fun init() {
|
||||||
renderer.connection.world.entities::entities.observeSet(this) {
|
renderer.connection.world.entities::entities.observeSet(this) {
|
||||||
for (entity in it.adds) {
|
renderer.queue.add {
|
||||||
this += entity
|
for (entity in it.adds) {
|
||||||
}
|
this += entity
|
||||||
for (entity in it.removes) {
|
}
|
||||||
this -= entity
|
for (entity in it.removes) {
|
||||||
|
this -= entity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user