From 45f744fa2b0adcc78af52b2d74eed19838d765dd Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 2 Jan 2022 20:24:38 -0500 Subject: [PATCH] api: fix wallobject orientation javadoc and use This is not an angle, and the model outline renderer code which uses it as one is incorrect. --- .../java/net/runelite/api/WallObject.java | 22 +++++++++++++++---- .../overlay/outline/ModelOutlineRenderer.java | 4 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/WallObject.java b/runelite-api/src/main/java/net/runelite/api/WallObject.java index 3c8b95793c..93d5e3b4f8 100644 --- a/runelite-api/src/main/java/net/runelite/api/WallObject.java +++ b/runelite-api/src/main/java/net/runelite/api/WallObject.java @@ -32,14 +32,28 @@ import java.awt.Shape; public interface WallObject extends TileObject { /** - * The angle of the first wall - * @see net.runelite.api.coords.Angle + * A bitfield with the orientation of the first wall + * 1 = West + * 2 = North + * 4 = East + * 8 = South + * 16 = North-west + * 32 = North-east + * 64 = South-east + * 128 = South-west */ int getOrientationA(); /** - * The angle of the second wall - * @see net.runelite.api.coords.Angle + * A bitfield with the orientation of the second wall + * 1 = West + * 2 = North + * 4 = East + * 8 = South + * 16 = North-west + * 32 = North-east + * 64 = South-east + * 128 = South-west */ int getOrientationB(); diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/outline/ModelOutlineRenderer.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/outline/ModelOutlineRenderer.java index 3047086dda..6f56546547 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/outline/ModelOutlineRenderer.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/outline/ModelOutlineRenderer.java @@ -1131,7 +1131,7 @@ public class ModelOutlineRenderer { drawModelOutline(model, lp.getX(), lp.getY(), Perspective.getTileHeight(client, lp, wallObject.getPlane()), - wallObject.getOrientationA(), outlineWidth, color, feather); + 0, outlineWidth, color, feather); } } @@ -1143,7 +1143,7 @@ public class ModelOutlineRenderer { drawModelOutline(model, lp.getX(), lp.getY(), Perspective.getTileHeight(client, lp, wallObject.getPlane()), - wallObject.getOrientationB(), outlineWidth, color, feather); + 0, outlineWidth, color, feather); } } }