From be1903bcf1d1eee6fde61dde7b98f81c7b7f345f Mon Sep 17 00:00:00 2001 From: Pazaz Date: Mon, 5 Aug 2024 15:18:15 -0400 Subject: [PATCH] fix: Right-click then left-click fix --- runetek3/src/main/java/jagex2/client/GameShell.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runetek3/src/main/java/jagex2/client/GameShell.java b/runetek3/src/main/java/jagex2/client/GameShell.java index bbac04b..00f132e 100644 --- a/runetek3/src/main/java/jagex2/client/GameShell.java +++ b/runetek3/src/main/java/jagex2/client/GameShell.java @@ -286,16 +286,16 @@ public final void mousePressed(@OriginalArg(0) MouseEvent e) { this.mouseClickY = y; try { - if ((e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0) { + if (e.getButton() == MouseEvent.BUTTON3) { this.mouseClickButton = 2; this.mouseButton = 2; - } else if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) != 0) { + } else { this.mouseClickButton = 1; this.mouseButton = 1; } if (InputTracking.enabled) { - InputTracking.mousePressed(x, y, (e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0 ? 1 : 0); + InputTracking.mousePressed(x, y, e.getButton() == MouseEvent.BUTTON3 ? 1 : 0); } } catch (NoSuchMethodError ex) { if (e.isMetaDown()) {