Skip to content

Commit d16542c

Browse files
authored
Prevent accidental client reauth (RSCPlus#211)
1 parent 64482e9 commit d16542c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/Game/Client.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,9 @@ public static void init_login() {
13311331
public static void init_game() {
13321332
boolean errorOnInit = false;
13331333

1334+
// Reset login button click state
1335+
Panel.setControlClicked(panelLogin, loginPassInput, false);
1336+
13341337
try {
13351338
Camera.init();
13361339

‎src/Game/Panel.java‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ public static void setControlToggled(Object panelSource, int controlId, int togg
248248
}
249249
}
250250

251+
public static void setControlClicked(Object panelSource, int controlId, boolean isClicked) {
252+
try {
253+
boolean[] clicked = (boolean[]) Reflection.menuClicked.get(panelSource);
254+
clicked[controlId] = isClicked;
255+
Reflection.menuClicked.set(panelSource, clicked);
256+
} catch (Exception e) {
257+
}
258+
}
259+
251260
public static int addCenterTextTo(
252261
Object panelSource,
253262
int xPos,

0 commit comments

Comments
 (0)