Skip to content

Commit

Permalink
Fixed drawing plane higher than 0 (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipkpjersi authored Dec 28, 2024
1 parent 45b85d7 commit 7f1dc47
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 2006Scape Client/src/main/java/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -9107,7 +9107,14 @@ public void method117(Stream stream) {
return;
}
if (k == 3) {
boolean debugPlanes = false;
if (debugPlanes) {
System.out.println("plane is " + plane);
}
plane = stream.readBits(2);
if (debugPlanes) {
System.out.println("plane is now " + plane);
}
int j1 = stream.readBits(1);
int i2 = stream.readBits(1);
if (i2 == 1) {
Expand All @@ -9116,6 +9123,15 @@ public void method117(Stream stream) {
int k2 = stream.readBits(7);
int l2 = stream.readBits(7);
myPlayer.setPos(l2, k2, j1 == 1);
//Handle plane changes, higher planes need the roof drawing checks disabled, and we need to manually update ObjectManager's anInt131 (plane) then manually call method22 to let the ObjectManaegr know we're on a different plane. This makes plane changes draw properly. Coords for testing this: lumb: 3207 3227 and varrock: 3209, 3392 and gnome agil: 2474, 3427
ObjectManager.hideRoofs = ClientSettings.HIDE_ROOFS;
ObjectManager.hideBuggyVarrockSwordShopSnow = ClientSettings.HIDE_BUGGY_VARROCK_SWORD_SHOP_SNOW;
if (plane > 0) {
ObjectManager.hideRoofs = false;
ObjectManager.hideBuggyVarrockSwordShopSnow = false;
}
ObjectManager.anInt131 = plane;
method22();
}
}

Expand Down

0 comments on commit 7f1dc47

Please sign in to comment.