Remove overlay draw distance

This commit is contained in:
Scott Burns
2019-05-23 09:40:03 +02:00
parent 10b300285a
commit 93f7db92f5
2 changed files with 2 additions and 11 deletions

View File

@@ -44,7 +44,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
class AgilityOverlay extends Overlay
{
private static final int MAX_DISTANCE = 2350;
private static final Color SHORTCUT_HIGH_LEVEL_COLOR = Color.ORANGE;
private final Client client;
@@ -77,8 +76,7 @@ class AgilityOverlay extends Overlay
}
Tile tile = obstacle.getTile();
if (tile.getPlane() == client.getPlane()
&& object.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
if (tile.getPlane() == client.getPlane())
{
// This assumes that the obstacle is not clickable.
if (Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()))
@@ -121,8 +119,7 @@ class AgilityOverlay extends Overlay
{
for (Tile markOfGraceTile : marksOfGrace)
{
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null
&& markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null)
{
final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly();

View File

@@ -43,8 +43,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
public class GroundMarkerOverlay extends Overlay
{
private static final int MAX_DRAW_DISTANCE = 32;
private final Client client;
private final GroundMarkerConfig config;
private final GroundMarkerPlugin plugin;
@@ -81,10 +79,6 @@ public class GroundMarkerOverlay extends Overlay
}
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
if (point.distanceTo(playerLocation) >= MAX_DRAW_DISTANCE)
{
return;
}
LocalPoint lp = LocalPoint.fromWorld(client, point);
if (lp == null)