mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
fluid wip and hopefully fixed F3 dangling ptr
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user