mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-01 14:39:13 -06:00
another mutablelist>arraylist
This commit is contained in:
parent
572ec05137
commit
7e0b684a20
1 changed files with 2 additions and 7 deletions
|
|
@ -24,13 +24,8 @@ object MapChunkRenderer {
|
|||
fun render(player: Player) {
|
||||
val last = player.playerFlags.lastViewport
|
||||
val updated: ArrayList<RegionChunk> = ArrayList()
|
||||
val current: ArrayList<MutableList<RegionChunk>> = ArrayList()
|
||||
val current: ArrayList<ArrayList<RegionChunk>> = 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<MutableList<RegionChunk>>, c: RegionChunk): Boolean {
|
||||
private fun containsChunk(list: ArrayList<ArrayList<RegionChunk>>, c: RegionChunk): Boolean {
|
||||
val sizeList = list.size
|
||||
for (x in 0 until sizeList) {
|
||||
val chunkSize: Int = list[x].size
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue