Remove overlay draw distance
This commit is contained in:
@@ -44,7 +44,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
|
|||||||
|
|
||||||
class AgilityOverlay extends Overlay
|
class AgilityOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int MAX_DISTANCE = 2350;
|
|
||||||
private static final Color SHORTCUT_HIGH_LEVEL_COLOR = Color.ORANGE;
|
private static final Color SHORTCUT_HIGH_LEVEL_COLOR = Color.ORANGE;
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
@@ -77,8 +76,7 @@ class AgilityOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tile tile = obstacle.getTile();
|
Tile tile = obstacle.getTile();
|
||||||
if (tile.getPlane() == client.getPlane()
|
if (tile.getPlane() == client.getPlane())
|
||||||
&& object.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
|
||||||
{
|
{
|
||||||
// This assumes that the obstacle is not clickable.
|
// This assumes that the obstacle is not clickable.
|
||||||
if (Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()))
|
if (Obstacles.TRAP_OBSTACLE_IDS.contains(object.getId()))
|
||||||
@@ -121,8 +119,7 @@ class AgilityOverlay extends Overlay
|
|||||||
{
|
{
|
||||||
for (Tile markOfGraceTile : marksOfGrace)
|
for (Tile markOfGraceTile : marksOfGrace)
|
||||||
{
|
{
|
||||||
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null
|
if (markOfGraceTile.getPlane() == client.getPlane() && markOfGraceTile.getItemLayer() != null)
|
||||||
&& markOfGraceTile.getLocalLocation().distanceTo(playerLocation) < MAX_DISTANCE)
|
|
||||||
{
|
{
|
||||||
final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly();
|
final Polygon poly = markOfGraceTile.getItemLayer().getCanvasTilePoly();
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ import net.runelite.client.ui.overlay.OverlayUtil;
|
|||||||
|
|
||||||
public class GroundMarkerOverlay extends Overlay
|
public class GroundMarkerOverlay extends Overlay
|
||||||
{
|
{
|
||||||
private static final int MAX_DRAW_DISTANCE = 32;
|
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final GroundMarkerConfig config;
|
private final GroundMarkerConfig config;
|
||||||
private final GroundMarkerPlugin plugin;
|
private final GroundMarkerPlugin plugin;
|
||||||
@@ -81,10 +79,6 @@ public class GroundMarkerOverlay extends Overlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
|
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
|
||||||
if (point.distanceTo(playerLocation) >= MAX_DRAW_DISTANCE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalPoint lp = LocalPoint.fromWorld(client, point);
|
LocalPoint lp = LocalPoint.fromWorld(client, point);
|
||||||
if (lp == null)
|
if (lp == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user