mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
blockprop: fall is now grav
This commit is contained in:
@@ -44,7 +44,10 @@ open class BlockLayer(val width: Int, val height: Int) : Disposable {
|
||||
|
||||
init {
|
||||
if (!unsafeArrayInitialised) {
|
||||
unsafe.setMemory(layerPtr, width * height * BYTES_PER_BLOCK.toLong(), 0)
|
||||
//unsafe.setMemory(layerPtr, width * height * BYTES_PER_BLOCK.toLong(), 0) // sometimes does not work?!
|
||||
for (i in 0 until width * height * BYTES_PER_BLOCK.toLong()) {
|
||||
unsafe.putByte(layerPtr + i, 0)
|
||||
}
|
||||
unsafeArrayInitialised = true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user