From f8902eea456ef27e527fb1ab471828477b098603 Mon Sep 17 00:00:00 2001 From: phrack Date: Sun, 14 Aug 2016 20:52:06 -0400 Subject: [PATCH] Fixed point DPI correction math --- src/main/java/com/shootoff/plugins/ShotToClick.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/shootoff/plugins/ShotToClick.java b/src/main/java/com/shootoff/plugins/ShotToClick.java index 14d5ddc..138a5b8 100644 --- a/src/main/java/com/shootoff/plugins/ShotToClick.java +++ b/src/main/java/com/shootoff/plugins/ShotToClick.java @@ -41,7 +41,7 @@ public void targetUpdate(Target target, TargetChange change) { } @Override public ExerciseMetadata getInfo() { - return new ExerciseMetadata("Shot to Click", "1.4", "phrack", + return new ExerciseMetadata("Shot to Click", "1.5", "phrack", "This exercise converts a shot on a projection to a click on the screen being projected. " + "To use this exercise, start the Projector Arena and calibrate, then minimize the arena " + "and replace it on the projector with a Flash game or similar that you'd like to play " @@ -53,8 +53,8 @@ public ExerciseMetadata getInfo() { public void shotListener(Shot shot, Optional hit) { final Point2D translatedShot = super.translateToTrueArenaCoords(new Point2D(shot.getX(), shot.getY())); - clicker.mouseMove((int) (shot.getX() + translatedShot.getX()), - (int) (shot.getY() + translatedShot.getY())); + clicker.mouseMove((int) (translatedShot.getX()), + (int) (translatedShot.getY())); clicker.mousePress(InputEvent.BUTTON1_DOWN_MASK); clicker.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); }