Skip to content

Commit

Permalink
Fixed point DPI correction math
Browse files Browse the repository at this point in the history
  • Loading branch information
phrack committed Aug 15, 2016
1 parent 52d24f9 commit f8902ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/shootoff/plugins/ShotToClick.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -53,8 +53,8 @@ public ExerciseMetadata getInfo() {
public void shotListener(Shot shot, Optional<Hit> 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);
}
Expand Down

0 comments on commit f8902ee

Please sign in to comment.