perspective: change worldToMinimap location calculation back

This is how the client calculates positions for npcs/players. Originally I had thought it fixed an issue with minimap overlays being off, but it was due to the constants we were using in worldToMinimap being off in order to account for renderMinimapLocation being wrong
This commit is contained in:
Adam
2018-07-27 18:25:44 -04:00
parent 6c7ea1f834
commit 042c99d3d0

View File

@@ -180,10 +180,8 @@ public class Perspective
public static Point worldToMiniMap(@Nonnull Client client, int x, int y, int distance)
{
LocalPoint localLocation = client.getLocalPlayer().getLocalLocation();
final int sceneX = x >>> LOCAL_COORD_BITS;
final int sceneY = y >>> LOCAL_COORD_BITS;
x = sceneX * 4 + 2 - localLocation.getX() / 32;
y = sceneY * 4 + 2 - localLocation.getY() / 32;
x = x / 32 - localLocation.getX() / 32;
y = y / 32 - localLocation.getY() / 32;
int dist = x * x + y * y;
if (dist < distance)