api: make getCanvasTilePoly work on multi-tile npcs
This commit is contained in:
@@ -295,7 +295,7 @@ public interface Actor extends Renderable, Locatable
|
||||
void setSpotAnimFrame(int spotAnimFrame);
|
||||
|
||||
/**
|
||||
* Gets the canvas area of the current tile the actor is standing on.
|
||||
* Gets the canvas area of the current tiles the actor is standing on.
|
||||
*
|
||||
* @return the current tile canvas area
|
||||
*/
|
||||
|
||||
@@ -35,8 +35,6 @@ import java.util.Set;
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.Tile;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
@@ -157,11 +155,7 @@ class AgilityOverlay extends Overlay
|
||||
Color color = config.sepulchreHighlightColor();
|
||||
for (NPC npc : npcs)
|
||||
{
|
||||
NPCComposition npcComposition = npc.getComposition();
|
||||
int size = npcComposition.getSize();
|
||||
LocalPoint lp = npc.getLocalLocation();
|
||||
|
||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||
Polygon tilePoly = npc.getCanvasTilePoly();
|
||||
if (tilePoly != null)
|
||||
{
|
||||
OverlayUtil.renderPolygon(graphics, tilePoly, color);
|
||||
|
||||
@@ -162,10 +162,7 @@ public class NpcSceneOverlay extends Overlay
|
||||
|
||||
if (highlightedNpc.isTile())
|
||||
{
|
||||
int size = npcComposition.getSize();
|
||||
LocalPoint lp = actor.getLocalLocation();
|
||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||
|
||||
Polygon tilePoly = actor.getCanvasTilePoly();
|
||||
renderPoly(graphics, borderColor, fillColor, tilePoly);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user