RuneMate / Issues

Client and API Issue tracking. See README for more information.
8 stars 0 forks source link

Camera.getZoom returns incorrect values when the canvas is larger than the default window size. #38

Open ccarpenter04 opened 5 years ago

ccarpenter04 commented 5 years ago

Describe the bug Camera.getZoom() will return values that do not correspond to the actual limitations of zooming when the game's canvas is larger than normal, likely due to it depending on some field of view like value which isn't being accounted for. I've seen it return both values slightly below 0 and above 1, while also getting maxed out at less than 0 and 1 depending on whether zooming in or out. It works perfectly at the standard resolution window on resizable mode and when in fixed mode.

Affected game modes: OSRS, RS3 is not currently supported by this method.

RuneMate version: The RuneMate version you experienced your problem on.2.95.18 To Reproduce Steps to reproduce the behaviour:

  1. Enter the resizable canvas mode
  2. Enlarge or shrink your game window in any way
  3. Check the values returned by getZoom() at various points and realize that they do not max at 1, min at 0, and often can't even reach those extremes.

Please include the code used to produce this bug. Off the top of my head, the easiest test would be:

OptionsTab.setCanvasMode(OptionsTab.CanvasMode.RESIZABLE);
Environment.setFrameBounds(1000, 1000);
Camera.setZoom(0);
System.out.println(Camera.getZoom());
Camera.setZoom(1);
System.out.println(Camera.getZoom());