npc highlight: skip noninteractiable npcs
This commit is contained in:
@@ -145,17 +145,17 @@ public class NpcSceneOverlay extends Overlay
|
|||||||
|
|
||||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color)
|
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color)
|
||||||
{
|
{
|
||||||
|
NPCComposition npcComposition = actor.getTransformedComposition();
|
||||||
|
if (npcComposition == null || !npcComposition.isVisible())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (config.renderStyle())
|
switch (config.renderStyle())
|
||||||
{
|
{
|
||||||
case SOUTH_WEST_TILE:
|
case SOUTH_WEST_TILE:
|
||||||
{
|
{
|
||||||
int size = 1;
|
int size = npcComposition.getSize();
|
||||||
NPCComposition composition = actor.getTransformedComposition();
|
|
||||||
if (composition != null)
|
|
||||||
{
|
|
||||||
size = composition.getSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalPoint localPoint = actor.getLocalLocation();
|
LocalPoint localPoint = actor.getLocalLocation();
|
||||||
|
|
||||||
int x = localPoint.getX() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
|
int x = localPoint.getX() - ((size - 1) * Perspective.LOCAL_TILE_SIZE / 2);
|
||||||
@@ -167,12 +167,7 @@ public class NpcSceneOverlay extends Overlay
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TILE:
|
case TILE:
|
||||||
int size = 1;
|
int size = npcComposition.getSize();
|
||||||
NPCComposition composition = actor.getTransformedComposition();
|
|
||||||
if (composition != null)
|
|
||||||
{
|
|
||||||
size = composition.getSize();
|
|
||||||
}
|
|
||||||
LocalPoint lp = actor.getLocalLocation();
|
LocalPoint lp = actor.getLocalLocation();
|
||||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user