From 93f7db92f561ed4d4b197377bdb9dc261dc7a7c2 Mon Sep 17 00:00:00 2001 From: Scott Burns Date: Thu, 23 May 2019 09:40:03 +0200 Subject: [PATCH] Remove overlay draw distance --- .../runelite/client/plugins/agility/AgilityOverlay.java | 7 ++----- .../client/plugins/groundmarkers/GroundMarkerOverlay.java | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java index 5599fca791..523ffdb715 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/agility/AgilityOverlay.java @@ -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(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerOverlay.java index f2760fc287..0d11dbf4a9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerOverlay.java @@ -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)