Model outliner (#735)
* Model outliner * Partial revert * Reformat code * Object indicators overhaul -> Hull/Clickbox/Outline (with different outline styles) * Implement config tweak for comboboxes (unhideValue/hideValue/enabledByValue/disabledByValue) * Reformat modeloutliner
This commit is contained in:
@@ -42,4 +42,14 @@ public interface DecorativeObject extends TileObject
|
|||||||
|
|
||||||
Renderable getRenderable();
|
Renderable getRenderable();
|
||||||
Renderable getRenderable2();
|
Renderable getRenderable2();
|
||||||
|
|
||||||
|
Model getModel1();
|
||||||
|
|
||||||
|
Model getModel2();
|
||||||
|
|
||||||
|
int getYOffset();
|
||||||
|
|
||||||
|
int getXOffset();
|
||||||
|
|
||||||
|
int getOrientation();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,4 +69,8 @@ public interface GameObject extends TileObject
|
|||||||
Angle getOrientation();
|
Angle getOrientation();
|
||||||
|
|
||||||
Renderable getRenderable();
|
Renderable getRenderable();
|
||||||
|
|
||||||
|
int getRsOrientation();
|
||||||
|
|
||||||
|
Model getModel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ package net.runelite.api;
|
|||||||
public interface GroundObject extends TileObject
|
public interface GroundObject extends TileObject
|
||||||
{
|
{
|
||||||
Renderable getRenderable();
|
Renderable getRenderable();
|
||||||
|
|
||||||
|
Model getModel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,4 +56,8 @@ public interface ItemLayer extends TileObject
|
|||||||
* @return the top item
|
* @return the top item
|
||||||
*/
|
*/
|
||||||
Renderable getTop();
|
Renderable getTop();
|
||||||
|
|
||||||
|
Model getModelBottom();
|
||||||
|
Model getModelMiddle();
|
||||||
|
Model getModelTop();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,4 +52,7 @@ public interface WallObject extends TileObject
|
|||||||
|
|
||||||
Renderable getRenderable1();
|
Renderable getRenderable1();
|
||||||
Renderable getRenderable2();
|
Renderable getRenderable2();
|
||||||
|
|
||||||
|
Model getModelA();
|
||||||
|
Model getModelB();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,16 +51,24 @@ public @interface ConfigItem
|
|||||||
|
|
||||||
String unhide() default "";
|
String unhide() default "";
|
||||||
|
|
||||||
|
String unhideValue() default "";
|
||||||
|
|
||||||
String hide() default "";
|
String hide() default "";
|
||||||
|
|
||||||
|
String hideValue() default "";
|
||||||
|
|
||||||
String parent() default "";
|
String parent() default "";
|
||||||
|
|
||||||
String enabledBy() default "";
|
String enabledBy() default "";
|
||||||
|
|
||||||
|
String enabledByValue() default "";
|
||||||
|
|
||||||
String disabledBy() default "";
|
String disabledBy() default "";
|
||||||
|
|
||||||
|
String disabledByValue() default "";
|
||||||
|
|
||||||
boolean parse() default false;
|
boolean parse() default false;
|
||||||
|
|
||||||
Class<?> clazz() default void.class;
|
Class<?> clazz() default void.class;
|
||||||
String method() default "";
|
String method() default "";
|
||||||
}
|
}
|
||||||
@@ -34,12 +34,18 @@ import java.util.ArrayList;
|
|||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
|
import net.runelite.api.DecorativeObject;
|
||||||
|
import net.runelite.api.GameObject;
|
||||||
|
import net.runelite.api.GroundObject;
|
||||||
|
import net.runelite.api.ItemLayer;
|
||||||
import net.runelite.api.MainBufferProvider;
|
import net.runelite.api.MainBufferProvider;
|
||||||
import net.runelite.api.Model;
|
import net.runelite.api.Model;
|
||||||
import net.runelite.api.NPC;
|
import net.runelite.api.NPC;
|
||||||
import net.runelite.api.NPCDefinition;
|
import net.runelite.api.NPCDefinition;
|
||||||
import net.runelite.api.Perspective;
|
import net.runelite.api.Perspective;
|
||||||
import net.runelite.api.Player;
|
import net.runelite.api.Player;
|
||||||
|
import net.runelite.api.TileObject;
|
||||||
|
import net.runelite.api.WallObject;
|
||||||
import net.runelite.api.coords.LocalPoint;
|
import net.runelite.api.coords.LocalPoint;
|
||||||
import net.runelite.client.task.Schedule;
|
import net.runelite.client.task.Schedule;
|
||||||
|
|
||||||
@@ -278,8 +284,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param x1 The starting x position
|
* @param x1 The starting x position
|
||||||
* @param x2 The ending x position
|
* @param x2 The ending x position
|
||||||
*/
|
*/
|
||||||
private void simulateHorizontalLineRasterizationForOutline(
|
private void simulateHorizontalLineRasterizationForOutline(int pixelPos, int x1, int x2)
|
||||||
int pixelPos, int x1, int x2)
|
|
||||||
{
|
{
|
||||||
if (x2 > clipX2)
|
if (x2 > clipX2)
|
||||||
{
|
{
|
||||||
@@ -337,8 +342,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param x3 The starting x position of the second line
|
* @param x3 The starting x position of the second line
|
||||||
* @param x4 The ending x position of the second line
|
* @param x4 The ending x position of the second line
|
||||||
*/
|
*/
|
||||||
private void outlineAroundHorizontalLine(
|
private void outlineAroundHorizontalLine(int pixelPos, int x1, int x2, int x3, int x4)
|
||||||
int pixelPos, int x1, int x2, int x3, int x4)
|
|
||||||
{
|
{
|
||||||
if (x1 < clipX1)
|
if (x1 < clipX1)
|
||||||
{
|
{
|
||||||
@@ -420,8 +424,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param x3 The x position of the third vertex in the triangle
|
* @param x3 The x position of the third vertex in the triangle
|
||||||
* @param y3 The y position of the third vertex in the triangle
|
* @param y3 The y position of the third vertex in the triangle
|
||||||
*/
|
*/
|
||||||
private void simulateTriangleRasterizationForOutline(
|
private void simulateTriangleRasterizationForOutline(int x1, int y1, int x2, int y2, int x3, int y3)
|
||||||
int x1, int y1, int x2, int y2, int x3, int y3)
|
|
||||||
{
|
{
|
||||||
// Swap vertices so y1 <= y2 <= y3 using bubble sort
|
// Swap vertices so y1 <= y2 <= y3 using bubble sort
|
||||||
if (y1 > y2)
|
if (y1 > y2)
|
||||||
@@ -615,8 +618,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param vertexOrientation The orientation of the vertices
|
* @param vertexOrientation The orientation of the vertices
|
||||||
* @return Returns true if any of them are inside the clip area, otherwise false
|
* @return Returns true if any of them are inside the clip area, otherwise false
|
||||||
*/
|
*/
|
||||||
private boolean projectVertices(Model model,
|
private boolean projectVertices(Model model, final int localX, final int localY, final int localZ, final int vertexOrientation)
|
||||||
final int localX, final int localY, final int localZ, final int vertexOrientation)
|
|
||||||
{
|
{
|
||||||
final int cameraX = client.getCameraX();
|
final int cameraX = client.getCameraX();
|
||||||
final int cameraY = client.getCameraY();
|
final int cameraY = client.getCameraY();
|
||||||
@@ -742,8 +744,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param innerColor The color of the pixels of the outline closest to the model
|
* @param innerColor The color of the pixels of the outline closest to the model
|
||||||
* @param outerColor The color of the pixels of the outline furthest away from the model
|
* @param outerColor The color of the pixels of the outline furthest away from the model
|
||||||
*/
|
*/
|
||||||
private void renderOutline(BufferedImage image, int outlineWidth,
|
private void renderOutline(BufferedImage image, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
Color innerColor, Color outerColor)
|
|
||||||
{
|
{
|
||||||
int[] imageData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
|
int[] imageData = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
|
||||||
List<PixelDistanceAlpha> ps = getPriorityList(outlineWidth);
|
List<PixelDistanceAlpha> ps = getPriorityList(outlineWidth);
|
||||||
@@ -886,9 +887,7 @@ public class ModelOutlineRenderer
|
|||||||
* @param innerColor The color of the pixels of the outline closest to the model
|
* @param innerColor The color of the pixels of the outline closest to the model
|
||||||
* @param outerColor The color of the pixels of the outline furthest away from the model
|
* @param outerColor The color of the pixels of the outline furthest away from the model
|
||||||
*/
|
*/
|
||||||
private void drawModelOutline(Model model,
|
private void drawModelOutline(Model model, int localX, int localY, int localZ, int orientation, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
int localX, int localY, int localZ, int orientation,
|
|
||||||
int outlineWidth, Color innerColor, Color outerColor)
|
|
||||||
{
|
{
|
||||||
if (outlineWidth <= 0)
|
if (outlineWidth <= 0)
|
||||||
{
|
{
|
||||||
@@ -930,8 +929,7 @@ public class ModelOutlineRenderer
|
|||||||
drawOutline(npc, outlineWidth, color, color);
|
drawOutline(npc, outlineWidth, color, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawOutline(NPC npc, int outlineWidth,
|
public void drawOutline(NPC npc, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
Color innerColor, Color outerColor)
|
|
||||||
{
|
{
|
||||||
int size = 1;
|
int size = 1;
|
||||||
NPCDefinition composition = npc.getTransformedDefinition();
|
NPCDefinition composition = npc.getTransformedDefinition();
|
||||||
@@ -959,8 +957,7 @@ public class ModelOutlineRenderer
|
|||||||
drawOutline(player, outlineWidth, color, color);
|
drawOutline(player, outlineWidth, color, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawOutline(Player player, int outlineWidth,
|
public void drawOutline(Player player, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
Color innerColor, Color outerColor)
|
|
||||||
{
|
{
|
||||||
LocalPoint lp = player.getLocalLocation();
|
LocalPoint lp = player.getLocalLocation();
|
||||||
if (lp != null)
|
if (lp != null)
|
||||||
@@ -970,4 +967,136 @@ public class ModelOutlineRenderer
|
|||||||
player.getOrientation(), outlineWidth, innerColor, outerColor);
|
player.getOrientation(), outlineWidth, innerColor, outerColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void drawOutline(GameObject gameObject, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
LocalPoint lp = gameObject.getLocalLocation();
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(gameObject.getModel(), lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, gameObject.getPlane()),
|
||||||
|
gameObject.getRsOrientation(), outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawOutline(GroundObject groundObject, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
LocalPoint lp = groundObject.getLocalLocation();
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(groundObject.getModel(), lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, client.getPlane()),
|
||||||
|
0, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawOutline(ItemLayer itemLayer, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
LocalPoint lp = itemLayer.getLocalLocation();
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
Model model = itemLayer.getModelBottom();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, itemLayer.getPlane()),
|
||||||
|
0, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
model = itemLayer.getModelMiddle();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, itemLayer.getPlane()),
|
||||||
|
0, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
model = itemLayer.getModelTop();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, itemLayer.getPlane()),
|
||||||
|
0, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawOutline(DecorativeObject decorativeObject, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
LocalPoint lp = decorativeObject.getLocalLocation();
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
Model model = decorativeObject.getModel1();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model,
|
||||||
|
lp.getX() + decorativeObject.getXOffset(),
|
||||||
|
lp.getY() + decorativeObject.getYOffset(),
|
||||||
|
Perspective.getTileHeight(client, lp, decorativeObject.getPlane()),
|
||||||
|
decorativeObject.getOrientation(), outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
model = decorativeObject.getModel2();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
// Offset is not used for the second model
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, decorativeObject.getPlane()),
|
||||||
|
decorativeObject.getOrientation(), outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void drawOutline(WallObject wallObject, int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
LocalPoint lp = wallObject.getLocalLocation();
|
||||||
|
if (lp != null)
|
||||||
|
{
|
||||||
|
Model model = wallObject.getModelA();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
|
||||||
|
wallObject.getOrientationA(), outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
model = wallObject.getModelB();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
drawModelOutline(model, lp.getX(), lp.getY(),
|
||||||
|
Perspective.getTileHeight(client, lp, wallObject.getPlane()),
|
||||||
|
wallObject.getOrientationB(), outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawOutline(TileObject tileObject, int outlineWidth, Color color)
|
||||||
|
{
|
||||||
|
drawOutline(tileObject, outlineWidth, color, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawOutline(TileObject tileObject,
|
||||||
|
int outlineWidth, Color innerColor, Color outerColor)
|
||||||
|
{
|
||||||
|
if (tileObject instanceof GameObject)
|
||||||
|
{
|
||||||
|
drawOutline((GameObject) tileObject, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
else if (tileObject instanceof GroundObject)
|
||||||
|
{
|
||||||
|
drawOutline((GroundObject) tileObject, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
else if (tileObject instanceof ItemLayer)
|
||||||
|
{
|
||||||
|
drawOutline((ItemLayer) tileObject, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
else if (tileObject instanceof DecorativeObject)
|
||||||
|
{
|
||||||
|
drawOutline((DecorativeObject) tileObject, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
else if (tileObject instanceof WallObject)
|
||||||
|
{
|
||||||
|
drawOutline((WallObject) tileObject, outlineWidth, innerColor, outerColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -633,6 +633,26 @@ public class ConfigPanel extends PluginPanel
|
|||||||
{
|
{
|
||||||
show = Boolean.parseBoolean(configManager.getConfiguration(cd.getGroup().value(), cid2.getItem().keyName()));
|
show = Boolean.parseBoolean(configManager.getConfiguration(cd.getGroup().value(), cid2.getItem().keyName()));
|
||||||
}
|
}
|
||||||
|
else if (cid2.getType().isEnum())
|
||||||
|
{
|
||||||
|
Class<? extends Enum> type = (Class<? extends Enum>) cid2.getType();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Enum selectedItem = Enum.valueOf(type, configManager.getConfiguration(cd.getGroup().value(), cid2.getItem().keyName()));
|
||||||
|
if (!cid.getItem().unhideValue().equals(""))
|
||||||
|
{
|
||||||
|
show = selectedItem.toString().equals(cid.getItem().unhideValue());
|
||||||
|
}
|
||||||
|
else if (!cid.getItem().hideValue().equals(""))
|
||||||
|
{
|
||||||
|
show = !selectedItem.toString().equals(cid.getItem().hideValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException ex)
|
||||||
|
{
|
||||||
|
log.info("So bad, so sad: {}", ex.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
@@ -817,7 +837,7 @@ public class ConfigPanel extends PluginPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (cid.getItem().parse())
|
if (cid.getItem().parse())
|
||||||
{
|
{
|
||||||
JLabel parsingLabel = new JLabel();
|
JLabel parsingLabel = new JLabel();
|
||||||
@@ -1067,8 +1087,8 @@ public class ConfigPanel extends PluginPanel
|
|||||||
.splitToList(String.format("%s || %s", cid2.getItem().unhide(), cid2.getItem().hide()));
|
.splitToList(String.format("%s || %s", cid2.getItem().unhide(), cid2.getItem().hide()));
|
||||||
|
|
||||||
if (itemHide.contains(cid.getItem().keyName()))
|
if (itemHide.contains(cid.getItem().keyName()))
|
||||||
{ // If another options visibility changes depending on the value of this checkbox, then render the entire menu again
|
{
|
||||||
|
// If another options visibility changes depending on the value of this checkbox, then render the entire menu again
|
||||||
reloadPluginlist(listItem, config, cd);
|
reloadPluginlist(listItem, config, cd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1107,6 +1127,36 @@ public class ConfigPanel extends PluginPanel
|
|||||||
{
|
{
|
||||||
JComboBox jComboBox = (JComboBox) component;
|
JComboBox jComboBox = (JComboBox) component;
|
||||||
configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), ((Enum) jComboBox.getSelectedItem()).name());
|
configManager.setConfiguration(cd.getGroup().value(), cid.getItem().keyName(), ((Enum) jComboBox.getSelectedItem()).name());
|
||||||
|
|
||||||
|
for (ConfigItemDescriptor cid2 : cd.getItems())
|
||||||
|
{
|
||||||
|
if (cid2.getItem().hidden() || !cid2.getItem().hide().isEmpty())
|
||||||
|
{
|
||||||
|
List<String> itemHide = Splitter
|
||||||
|
.onPattern("\\|\\|")
|
||||||
|
.trimResults()
|
||||||
|
.omitEmptyStrings()
|
||||||
|
.splitToList(String.format("%s || %s", cid2.getItem().unhide(), cid2.getItem().hide()));
|
||||||
|
|
||||||
|
if (itemHide.contains(cid.getItem().keyName()))
|
||||||
|
{
|
||||||
|
reloadPluginlist(listItem, config, cd);
|
||||||
|
}
|
||||||
|
|
||||||
|
String changedVal = ((Enum) jComboBox.getSelectedItem()).name();
|
||||||
|
|
||||||
|
if (cid2.getItem().enabledBy().contains(cid.getItem().keyName()) && cid2.getItem().enabledByValue().equals(changedVal))
|
||||||
|
{
|
||||||
|
configManager.setConfiguration(cd.getGroup().value(), cid2.getItem().keyName(), "true");
|
||||||
|
reloadPluginlist(listItem, config, cd);
|
||||||
|
}
|
||||||
|
else if (cid2.getItem().disabledBy().contains(cid.getItem().keyName()) && cid2.getItem().disabledByValue().equals(changedVal))
|
||||||
|
{
|
||||||
|
configManager.setConfiguration(cd.getGroup().value(), cid2.getItem().keyName(), "false");
|
||||||
|
reloadPluginlist(listItem, config, cd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (component instanceof HotkeyButton)
|
else if (component instanceof HotkeyButton)
|
||||||
{
|
{
|
||||||
@@ -1223,4 +1273,4 @@ public class ConfigPanel extends PluginPanel
|
|||||||
{
|
{
|
||||||
openGroupConfigPanel(listItem, config, cd, true);
|
openGroupConfigPanel(listItem, config, cd, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2019, Owain van Brakel <https://github.com/Owain94>
|
||||||
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
|
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -30,48 +31,85 @@ import net.runelite.client.config.Config;
|
|||||||
import net.runelite.client.config.ConfigGroup;
|
import net.runelite.client.config.ConfigGroup;
|
||||||
import net.runelite.client.config.ConfigItem;
|
import net.runelite.client.config.ConfigItem;
|
||||||
import net.runelite.client.config.Range;
|
import net.runelite.client.config.Range;
|
||||||
|
import net.runelite.client.config.Stub;
|
||||||
|
|
||||||
@ConfigGroup("objectindicators")
|
@ConfigGroup("objectindicators")
|
||||||
public interface ObjectIndicatorsConfig extends Config
|
public interface ObjectIndicatorsConfig extends Config
|
||||||
{
|
{
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 0,
|
keyName = "overlayStub",
|
||||||
|
name = "Overlay Style",
|
||||||
|
description = "",
|
||||||
|
position = 0
|
||||||
|
)
|
||||||
|
default Stub overlayStub()
|
||||||
|
{
|
||||||
|
return new Stub();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 1,
|
||||||
|
keyName = "objectMarkerRenderStyle",
|
||||||
|
name = "Highlight Style",
|
||||||
|
description = "Highlight setting",
|
||||||
|
parent = "overlayStub"
|
||||||
|
)
|
||||||
|
default RenderStyle objectMarkerRenderStyle()
|
||||||
|
{
|
||||||
|
return RenderStyle.OUTLINE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 2,
|
||||||
|
keyName = "objectMarkerOutlineRenderStyle",
|
||||||
|
name = "Outline Style",
|
||||||
|
description = "Highlight outline setting",
|
||||||
|
parent = "overlayStub",
|
||||||
|
hidden = true,
|
||||||
|
unhide = "objectMarkerRenderStyle",
|
||||||
|
unhideValue = "OUTLINE"
|
||||||
|
)
|
||||||
|
default OutlineRenderStyle objectMarkerOutlineRenderStyle()
|
||||||
|
{
|
||||||
|
return OutlineRenderStyle.NORMAL_OUTLINE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "colorStub",
|
||||||
|
name = "Colors",
|
||||||
|
description = "",
|
||||||
|
position = 3
|
||||||
|
)
|
||||||
|
default Stub colorStub()
|
||||||
|
{
|
||||||
|
return new Stub();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
position = 4,
|
||||||
keyName = "markerColor",
|
keyName = "markerColor",
|
||||||
name = "Marker color",
|
name = "Marker color",
|
||||||
description = "Configures the color of object marker"
|
description = "Configures the outer color of object marker",
|
||||||
|
parent = "colorStub"
|
||||||
)
|
)
|
||||||
default Color markerColor()
|
default Color objectMarkerColor()
|
||||||
{
|
{
|
||||||
return Color.YELLOW;
|
return Color.YELLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Range(
|
@Range(
|
||||||
min = 0,
|
max = 100
|
||||||
max = 10
|
|
||||||
)
|
)
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
position = 1,
|
position = 5,
|
||||||
keyName = "stroke",
|
keyName = "objectMarkerAlpha",
|
||||||
name = "Stroke Size",
|
|
||||||
description = "Configures the stroke size of object marker"
|
|
||||||
)
|
|
||||||
default int stroke()
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Range(
|
|
||||||
min = 0,
|
|
||||||
max = 255
|
|
||||||
)
|
|
||||||
@ConfigItem(
|
|
||||||
position = 2,
|
|
||||||
keyName = "alpha",
|
|
||||||
name = "Alpha",
|
name = "Alpha",
|
||||||
description = "Configures the opacity/alpha of object marker"
|
description = "Configures the opacity/alpha of object marker",
|
||||||
|
parent = "colorStub"
|
||||||
)
|
)
|
||||||
default int alpha()
|
default int objectMarkerAlpha()
|
||||||
{
|
{
|
||||||
return 20;
|
return 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Copyright (c) 2019, Owain van Brakel <https://github.com/Owain94>
|
||||||
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
|
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -24,33 +25,40 @@
|
|||||||
*/
|
*/
|
||||||
package net.runelite.client.plugins.objectindicators;
|
package net.runelite.client.plugins.objectindicators;
|
||||||
|
|
||||||
import java.awt.BasicStroke;
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.awt.Polygon;
|
import java.awt.Polygon;
|
||||||
|
import java.awt.geom.Area;
|
||||||
|
import static java.lang.Math.floor;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.DecorativeObject;
|
import net.runelite.api.DecorativeObject;
|
||||||
import net.runelite.api.GameObject;
|
import net.runelite.api.GameObject;
|
||||||
import net.runelite.api.TileObject;
|
import net.runelite.api.TileObject;
|
||||||
|
import net.runelite.client.graphics.ModelOutlineRenderer;
|
||||||
import net.runelite.client.ui.overlay.Overlay;
|
import net.runelite.client.ui.overlay.Overlay;
|
||||||
import net.runelite.client.ui.overlay.OverlayLayer;
|
import net.runelite.client.ui.overlay.OverlayLayer;
|
||||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||||
import net.runelite.client.ui.overlay.OverlayPriority;
|
import net.runelite.client.ui.overlay.OverlayPriority;
|
||||||
|
import net.runelite.client.ui.overlay.OverlayUtil;
|
||||||
|
|
||||||
class ObjectIndicatorsOverlay extends Overlay
|
class ObjectIndicatorsOverlay extends Overlay
|
||||||
{
|
{
|
||||||
|
private static final Color TRANSPARENT = new Color(0, 0, 0, 0);
|
||||||
|
|
||||||
private final Client client;
|
private final Client client;
|
||||||
private final ObjectIndicatorsConfig config;
|
private final ObjectIndicatorsConfig config;
|
||||||
private final ObjectIndicatorsPlugin plugin;
|
private final ObjectIndicatorsPlugin plugin;
|
||||||
|
private final ModelOutlineRenderer modelOutliner;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private ObjectIndicatorsOverlay(Client client, ObjectIndicatorsConfig config, ObjectIndicatorsPlugin plugin)
|
private ObjectIndicatorsOverlay(Client client, ObjectIndicatorsConfig config, ObjectIndicatorsPlugin plugin, ModelOutlineRenderer modelOutliner)
|
||||||
{
|
{
|
||||||
this.client = client;
|
this.client = client;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
this.modelOutliner = modelOutliner;
|
||||||
setPosition(OverlayPosition.DYNAMIC);
|
setPosition(OverlayPosition.DYNAMIC);
|
||||||
setPriority(OverlayPriority.LOW);
|
setPriority(OverlayPriority.LOW);
|
||||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||||
@@ -66,46 +74,70 @@ class ObjectIndicatorsOverlay extends Overlay
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Polygon polygon;
|
Color color = config.objectMarkerColor();
|
||||||
Polygon polygon2 = null;
|
int opacity = (int) floor(config.objectMarkerAlpha() * 2.55);
|
||||||
|
Color objectColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), opacity);
|
||||||
|
|
||||||
if (object instanceof GameObject)
|
switch (config.objectMarkerRenderStyle())
|
||||||
{
|
{
|
||||||
polygon = ((GameObject) object).getConvexHull();
|
case OUTLINE:
|
||||||
}
|
switch (config.objectMarkerOutlineRenderStyle())
|
||||||
else if (object instanceof DecorativeObject)
|
{
|
||||||
{
|
case THIN_OUTLINE:
|
||||||
polygon = ((DecorativeObject) object).getConvexHull();
|
modelOutliner.drawOutline(object, 1, objectColor);
|
||||||
polygon2 = ((DecorativeObject) object).getConvexHull2();
|
break;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
polygon = object.getCanvasTilePoly();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (polygon != null)
|
case NORMAL_OUTLINE:
|
||||||
{
|
modelOutliner.drawOutline(object, 2, objectColor);
|
||||||
renderPoly(graphics, polygon, config.markerColor(), config.stroke(), config.alpha());
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (polygon2 != null)
|
case THIN_GLOW:
|
||||||
{
|
modelOutliner.drawOutline(object, 4, objectColor, TRANSPARENT);
|
||||||
renderPoly(graphics, polygon2, config.markerColor(), config.stroke(), config.alpha());
|
break;
|
||||||
|
|
||||||
|
case GLOW:
|
||||||
|
modelOutliner.drawOutline(object, 8, objectColor, TRANSPARENT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case HULL:
|
||||||
|
final Polygon polygon;
|
||||||
|
Polygon polygon2 = null;
|
||||||
|
|
||||||
|
if (object instanceof GameObject)
|
||||||
|
{
|
||||||
|
polygon = ((GameObject) object).getConvexHull();
|
||||||
|
}
|
||||||
|
else if (object instanceof DecorativeObject)
|
||||||
|
{
|
||||||
|
polygon = ((DecorativeObject) object).getConvexHull();
|
||||||
|
polygon2 = ((DecorativeObject) object).getConvexHull2();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
polygon = object.getCanvasTilePoly();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (polygon != null)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderPolygon(graphics, polygon, objectColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (polygon2 != null)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderPolygon(graphics, polygon2, objectColor);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case CLICKBOX:
|
||||||
|
Area clickbox = object.getClickbox();
|
||||||
|
if (clickbox != null)
|
||||||
|
{
|
||||||
|
OverlayUtil.renderHoverableArea(graphics, object.getClickbox(), client.getMouseCanvasPosition(), TRANSPARENT, objectColor, objectColor.darker());
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void renderPoly(Graphics2D graphics, Polygon polygon, Color color, int stroke, int alpha)
|
|
||||||
{
|
|
||||||
if (polygon != null)
|
|
||||||
{
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 255));
|
|
||||||
graphics.setStroke(new BasicStroke(stroke));
|
|
||||||
graphics.draw(polygon);
|
|
||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), alpha));
|
|
||||||
graphics.fill(polygon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, Owain van Brakel <https://github.com/Owain94>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.runelite.client.plugins.objectindicators;
|
||||||
|
|
||||||
|
public enum OutlineRenderStyle
|
||||||
|
{
|
||||||
|
THIN_OUTLINE,
|
||||||
|
NORMAL_OUTLINE,
|
||||||
|
THIN_GLOW,
|
||||||
|
GLOW
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, Owain van Brakel <https://github.com/Owain94>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
*
|
||||||
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
* list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
|
* and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.runelite.client.plugins.objectindicators;
|
||||||
|
|
||||||
|
public enum RenderStyle
|
||||||
|
{
|
||||||
|
CLICKBOX,
|
||||||
|
HULL,
|
||||||
|
OUTLINE
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@ public abstract class RSBoundaryObjectMixin implements RSBoundaryObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Model getModelA()
|
public Model getModelA()
|
||||||
{
|
{
|
||||||
Renderable renderable = getRenderable1();
|
Renderable renderable = getRenderable1();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
@@ -53,7 +53,7 @@ public abstract class RSBoundaryObjectMixin implements RSBoundaryObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Model getModelB()
|
public Model getModelB()
|
||||||
{
|
{
|
||||||
Renderable renderable = getRenderable2();
|
Renderable renderable = getRenderable2();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ public abstract class RSFloorDecorationMixin implements RSFloorDecoration
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Model getModel()
|
@Override
|
||||||
|
public Model getModel()
|
||||||
{
|
{
|
||||||
Renderable renderable = getRenderable();
|
Renderable renderable = getRenderable();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
|
|||||||
@@ -59,7 +59,8 @@ public abstract class RSGameObjectMixin implements RSGameObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private RSModel getModel()
|
@Override
|
||||||
|
public RSModel getModel()
|
||||||
{
|
{
|
||||||
RSEntity renderable = getRenderable();
|
RSEntity renderable = getRenderable();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package net.runelite.mixins;
|
package net.runelite.mixins;
|
||||||
|
|
||||||
import java.awt.geom.Area;
|
import java.awt.geom.Area;
|
||||||
|
import net.runelite.api.Model;
|
||||||
|
import net.runelite.api.Renderable;
|
||||||
import net.runelite.api.mixins.Inject;
|
import net.runelite.api.mixins.Inject;
|
||||||
import net.runelite.api.mixins.Mixin;
|
import net.runelite.api.mixins.Mixin;
|
||||||
import net.runelite.rs.api.RSGroundItemPile;
|
import net.runelite.rs.api.RSGroundItemPile;
|
||||||
@@ -31,4 +33,64 @@ public abstract class RSGroundItemPileMixin implements RSGroundItemPile
|
|||||||
{
|
{
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public Model getModelBottom()
|
||||||
|
{
|
||||||
|
Renderable renderable = getBottom();
|
||||||
|
if (renderable == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (renderable instanceof Model)
|
||||||
|
{
|
||||||
|
return (Model) renderable;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return renderable.getModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public Model getModelMiddle()
|
||||||
|
{
|
||||||
|
Renderable renderable = getMiddle();
|
||||||
|
if (renderable == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (renderable instanceof Model)
|
||||||
|
{
|
||||||
|
return (Model) renderable;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return renderable.getModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
public Model getModelTop()
|
||||||
|
{
|
||||||
|
Renderable renderable = getTop();
|
||||||
|
if (renderable == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (renderable instanceof Model)
|
||||||
|
{
|
||||||
|
return (Model) renderable;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return renderable.getModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ public abstract class RSWallDecorationMixin implements RSWallDecoration
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private RSModel getModel()
|
@Override
|
||||||
|
public RSModel getModel1()
|
||||||
{
|
{
|
||||||
RSEntity renderable = getRenderable();
|
RSEntity renderable = getRenderable();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
@@ -60,7 +61,8 @@ public abstract class RSWallDecorationMixin implements RSWallDecoration
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private RSModel getModel2()
|
@Override
|
||||||
|
public RSModel getModel2()
|
||||||
{
|
{
|
||||||
RSEntity renderable = getRenderable2();
|
RSEntity renderable = getRenderable2();
|
||||||
if (renderable == null)
|
if (renderable == null)
|
||||||
@@ -89,7 +91,7 @@ public abstract class RSWallDecorationMixin implements RSWallDecoration
|
|||||||
Area clickbox = new Area();
|
Area clickbox = new Area();
|
||||||
|
|
||||||
LocalPoint lp = getLocalLocation();
|
LocalPoint lp = getLocalLocation();
|
||||||
Area clickboxA = Perspective.getClickbox(client, getModel(), 0,
|
Area clickboxA = Perspective.getClickbox(client, getModel1(), 0,
|
||||||
new LocalPoint(lp.getX() + getXOffset(), lp.getY() + getYOffset()));
|
new LocalPoint(lp.getX() + getXOffset(), lp.getY() + getYOffset()));
|
||||||
Area clickboxB = Perspective.getClickbox(client, getModel2(), 0, lp);
|
Area clickboxB = Perspective.getClickbox(client, getModel2(), 0, lp);
|
||||||
|
|
||||||
@@ -115,7 +117,7 @@ public abstract class RSWallDecorationMixin implements RSWallDecoration
|
|||||||
@Override
|
@Override
|
||||||
public Polygon getConvexHull()
|
public Polygon getConvexHull()
|
||||||
{
|
{
|
||||||
RSModel model = getModel();
|
RSModel model = getModel1();
|
||||||
|
|
||||||
if (model == null)
|
if (model == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public interface RSGameObject extends GameObject
|
|||||||
int getHeight();
|
int getHeight();
|
||||||
|
|
||||||
@Import("orientation")
|
@Import("orientation")
|
||||||
|
@Override
|
||||||
int getRsOrientation();
|
int getRsOrientation();
|
||||||
|
|
||||||
@Import("tag")
|
@Import("tag")
|
||||||
|
|||||||
Reference in New Issue
Block a user