mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
turns out actors still have the camera artefacts...
This commit is contained in:
@@ -572,6 +572,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
}
|
||||
|
||||
private var worldWidth: Double = 0.0
|
||||
private var oldCamX = 0
|
||||
|
||||
/**
|
||||
* Ingame (world) related updates; UI update must go to renderGame()
|
||||
@@ -633,13 +634,17 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
BlockStats.update()
|
||||
}
|
||||
// fill up visibleActorsRenderFront for wires, if:
|
||||
// 1. something is cued on the wire change queue
|
||||
// 2. wire renderclass changed
|
||||
if (newWorldLoadedLatch || wireChangeQueue.isNotEmpty() || selectedWireRenderClass != oldSelectedWireRenderClass) {
|
||||
// 0. Camera wrapped
|
||||
// 1. new world has been loaded
|
||||
// 2. something is cued on the wire change queue
|
||||
// 3. wire renderclass changed
|
||||
if (Math.abs(WorldCamera.x - oldCamX) >= worldWidth * 0.85 ||
|
||||
newWorldLoadedLatch || wireChangeQueue.isNotEmpty() || selectedWireRenderClass != oldSelectedWireRenderClass) {
|
||||
measureDebugTime("Ingame.FillUpWiresBuffer") {
|
||||
fillUpWiresBuffer()
|
||||
}
|
||||
}
|
||||
oldCamX = WorldCamera.x
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user