Skip to content

Commit d0efc57

Browse files
committed
refactor: rename some updateserver locals
1 parent 2871de7 commit d0efc57

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public class Game {
9595
public static int modewhere = 0;
9696
public static long lastClickTime = 0L;
9797
public static int mouseInvInterfaceIndex = 0;
98-
public static int anInt509 = 0;
98+
public static int updateServerConnectAttemptCounter = 0;
9999
public static boolean aBoolean519 = true;
100100
public static MouseCapturer mouseCapturer;
101101
public static int anInt2591 = 0;
@@ -115,7 +115,7 @@ public class Game {
115115
public static int connectionStage = 0;
116116
public static int anInt292 = 0;
117117
public static boolean accountFlagged = false;
118-
public static long aLong1841;
118+
public static long updateServerHandshakeSentAtMs;
119119
public static int clientVersion;
120120
public static int playerRights = 0;
121121
public static Timer gameTimer;
@@ -2142,16 +2142,16 @@ public void method35(int arg1) {
21422142
if (anInt292 >= 4) {
21432143
if (gameStatusCode <= 5) {
21442144
this.openErrorPage("js5connect");
2145-
anInt509 = 3000;
2145+
updateServerConnectAttemptCounter = 3000;
21462146
} else
2147-
anInt509 = 3000;
2147+
updateServerConnectAttemptCounter = 3000;
21482148
}
21492149
} else {
21502150
this.openErrorPage("js5connect_outofdate");
21512151
gameStatusCode = 1000;
21522152
}
21532153
} else if (gameStatusCode > 5)
2154-
anInt509 = 3000;
2154+
updateServerConnectAttemptCounter = 3000;
21552155
else {
21562156
this.openErrorPage("js5connect_full");
21572157
gameStatusCode = 1000;
@@ -2250,14 +2250,14 @@ public void connectUpdateServer() {
22502250
if (updateServer.ioExceptions >= 4) {
22512251
if (gameStatusCode > 5) {
22522252
updateServer.ioExceptions = 3;
2253-
anInt509 = 3000;
2253+
updateServerConnectAttemptCounter = 3000;
22542254
} else {
22552255
this.openErrorPage("js5io");
22562256
gameStatusCode = 1000;
22572257
return;
22582258
}
22592259
}
2260-
if (anInt509-- <= 0) {
2260+
if (updateServerConnectAttemptCounter-- <= 0) {
22612261
do {
22622262
try {
22632263
if (connectionStage == 0) {
@@ -2279,11 +2279,11 @@ public void connectUpdateServer() {
22792279
buffer.putIntBE(435); // Cache revision
22802280
updateServerSocket.sendDataFromBuffer(5, 0, buffer.buffer);
22812281
connectionStage++;
2282-
aLong1841 = System.currentTimeMillis();
2282+
updateServerHandshakeSentAtMs = System.currentTimeMillis();
22832283
}
22842284
if (connectionStage == 3) {
22852285
if (gameStatusCode > 5 && updateServerSocket.inputStreamAvailable() <= 0) {
2286-
if (System.currentTimeMillis() + -aLong1841 > 30000L) {
2286+
if (System.currentTimeMillis() - updateServerHandshakeSentAtMs > 30000L) {
22872287
method35(-2);
22882288
break;
22892289
}

0 commit comments

Comments
 (0)