turns out actors still have the camera artefacts...

This commit is contained in:
minjaesong
2021-09-17 19:48:31 +09:00
parent 4ab9a18ff6
commit 58be058b86
3 changed files with 38 additions and 8 deletions

View File

@@ -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
}