fluid wip and hopefully fixed F3 dangling ptr

This commit is contained in:
minjaesong
2024-07-14 16:13:59 +09:00
parent 23d99c0c86
commit 01ce5fb3e2
11 changed files with 183 additions and 31 deletions

View File

@@ -196,6 +196,8 @@ object IngameRenderer : Disposable {
// printdbg(this, "Set new RenderedWorld (UUID=${world.worldIndex}) at time ${System.currentTimeMillis()} (disposed: ${world.disposed}), called by:")
// printStackTrace(this)
var successful = false
try {
// change worlds from internal methods
@@ -210,11 +212,19 @@ object IngameRenderer : Disposable {
// "new world: ${world.hashCode()}")
newWorldLoadedLatch = true
}
successful = true
}
catch (e: Throwable) {
e.printStackTrace()
// new init, do nothing
}
finally {
if (successful)
TerrarumPostProcessor.debugUI.world = world
else
TerrarumPostProcessor.debugUI.world = null
}
}
private var oldCamX = 0