From 29ab54994f418d5a760090f62b1194c42f3a4bf7 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 31 May 2018 12:27:58 -0400 Subject: [PATCH] perspective: do not remove culled faces from clickbox calculation It seems culled faces are intentionally added to some models for their clickboxes. --- .../main/java/net/runelite/api/Perspective.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Perspective.java b/runelite-api/src/main/java/net/runelite/api/Perspective.java index 2aa46c04eb..1309ef598e 100644 --- a/runelite-api/src/main/java/net/runelite/api/Perspective.java +++ b/runelite-api/src/main/java/net/runelite/api/Perspective.java @@ -494,16 +494,6 @@ public class Perspective return clickBox; } - /** - * Determine if a triangle goes counter clockwise - * - * @return Returns true if the triangle goes counter clockwise and should be culled, otherwise false - */ - private static boolean cullFace(int x1, int y1, int x2, int y2, int x3, int y3) - { - return (y2 - y1) * (x3 - x2) - (x2 - x1) * (y3 - y2) < 0; - } - /** * Determine if a given point is off-screen. * @@ -560,11 +550,6 @@ public class Perspective continue; } - if (cullFace(a.getX(), a.getY(), b.getX(), b.getY(), c.getX(), c.getY())) - { - continue; - } - if (isOffscreen(client, a) && isOffscreen(client, b) && isOffscreen(client, c)) { continue;