mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
fix: ore and fluid layer was not being disposed of
This commit is contained in:
@@ -45,6 +45,10 @@ class SimpleGameWorld(width: Int, height: Int) : GameWorld(width, height) {
|
||||
override lateinit var layerWall: BlockLayerI16
|
||||
override lateinit var layerTerrain: BlockLayerI16
|
||||
constructor() : this(0, 0)
|
||||
override fun dispose() {
|
||||
layerWall.dispose()
|
||||
layerTerrain.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
open class GameWorld(
|
||||
@@ -921,6 +925,8 @@ open class GameWorld(
|
||||
override fun dispose() {
|
||||
layerWall.dispose()
|
||||
layerTerrain.dispose()
|
||||
layerOres.dispose()
|
||||
layerFluids.dispose()
|
||||
//nullWorldInstance?.dispose() // must be called ONLY ONCE; preferably when the app exits
|
||||
|
||||
disposed = true
|
||||
|
||||
Reference in New Issue
Block a user