Skip to content

Commit 38873fb

Browse files
committed
refactor: rename currentPositionZ to setPlane
1 parent bf8dc4d commit 38873fb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/main/java/org/runejs/client/Landscape.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ public static void loadRegion() {
213213
if(z < -1 + Player.worldLevel)
214214
z = -1 + Player.worldLevel;
215215
if(!VertexNormal.lowMemory)
216-
Game.currentScene.setHeightLevel(0);
216+
Game.currentScene.setPlane(0);
217217
else
218-
Game.currentScene.setHeightLevel(lowestPlane);
218+
Game.currentScene.setPlane(lowestPlane);
219219
for(int x = 0; x < 104; x++) {
220220
for(int y = 0; y < 104; y++)
221221
MovedStatics.spawnGroundItem(y, x);

src/main/java/org/runejs/client/scene/Scene.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class Scene {
7272
public int[][][] tileOcclusionCycles;
7373
public int sceneSpawnRequestsCacheCurrentPos = 0;
7474
public InteractiveObject[] sceneSpawnRequestsCache = new InteractiveObject[5000];
75-
public int currentPositionZ = 0;
75+
public int plane = 0;
7676
public int[][][] heightMap;
7777
public int mergeIndexTmp = 0;
7878
public int[] mergeIndexA = new int[10000];
@@ -443,7 +443,7 @@ public void render(Camera camera, int plane) {
443443
}
444444
processCulling(plane);
445445
anInt109 = 0;
446-
for (int z = currentPositionZ; z < mapSizeZ; z++) {
446+
for (int z = this.plane; z < mapSizeZ; z++) {
447447
SceneTile[][] sceneTiles = tileArray[z];
448448
for (int x = currentPositionX; x < mapBoundsX; x++) {
449449
for (int y = currentPositionY; y < mapBoundsY; y++) {
@@ -463,7 +463,7 @@ public void render(Camera camera, int plane) {
463463
}
464464
}
465465
}
466-
for (int i = currentPositionZ; i < mapSizeZ; i++) {
466+
for (int i = this.plane; i < mapSizeZ; i++) {
467467
SceneTile[][] sceneTiles = tileArray[i];
468468
for (int i_25_ = -TILE_DRAW_DISTANCE; i_25_ <= 0; i_25_++) {
469469
int i_26_ = cameraPositionTileX + i_25_;
@@ -508,7 +508,7 @@ public void render(Camera camera, int plane) {
508508
}
509509
}
510510
}
511-
for (int i = currentPositionZ; i < mapSizeZ; i++) {
511+
for (int i = this.plane; i < mapSizeZ; i++) {
512512
SceneTile[][] sceneTiles = tileArray[i];
513513
for (int i_31_ = -TILE_DRAW_DISTANCE; i_31_ <= 0; i_31_++) {
514514
int i_32_ = cameraPositionTileX + i_31_;
@@ -1940,12 +1940,12 @@ public void removeInteractiveObject(int z, int x, int y) {
19401940
}
19411941
}
19421942

1943-
public void setHeightLevel(int z) {
1944-
currentPositionZ = z;
1943+
public void setPlane(int plane) {
1944+
this.plane = plane;
19451945
for (int x = 0; x < mapSizeX; x++) {
19461946
for (int y = 0; y < mapSizeY; y++) {
1947-
if (tileArray[z][x][y] == null) {
1948-
tileArray[z][x][y] = new SceneTile(z, x, y);
1947+
if (tileArray[plane][x][y] == null) {
1948+
tileArray[plane][x][y] = new SceneTile(plane, x, y);
19491949
}
19501950
}
19511951
}

0 commit comments

Comments
 (0)