diff --git a/Server/src/main/core/game/world/update/MapChunkRenderer.kt b/Server/src/main/core/game/world/update/MapChunkRenderer.kt index 22fd11b8d..3d0d644a9 100644 --- a/Server/src/main/core/game/world/update/MapChunkRenderer.kt +++ b/Server/src/main/core/game/world/update/MapChunkRenderer.kt @@ -24,13 +24,8 @@ object MapChunkRenderer { fun render(player: Player) { val last = player.playerFlags.lastViewport val updated: ArrayList = ArrayList() - val current: ArrayList> = ArrayList() + val current: ArrayList> = ArrayList() - // Center the build area on the loaded scene anchor (lastSceneGraph), NOT the live player position. - // The client's 13x13 build area is anchored at lastSceneGraph; addressing chunks relative to it keeps - // every chunk packet inside the client's scene window even when the player has drifted up to 3 chunks - // from the anchor (the scene graph only rebuilds at a drift of 4). Using player.location here instead - // pushes the viewport edge to drift+6 chunks from the anchor, off-window, so edge items never render. val anchor = player.playerFlags.lastSceneGraph ?: player.location val center = Location.create(anchor.x, anchor.y, player.location.z) for (dcx in -BUILD_AREA_DEPTH..BUILD_AREA_DEPTH) { @@ -76,7 +71,7 @@ object MapChunkRenderer { * @param c The region chunk. * @return `True` if so. */ - private fun containsChunk(list: MutableList>, c: RegionChunk): Boolean { + private fun containsChunk(list: ArrayList>, c: RegionChunk): Boolean { val sizeList = list.size for (x in 0 until sizeList) { val chunkSize: Int = list[x].size