perspective: ignore invisible tris in clickbox calculation
This commit is contained in:
@@ -688,6 +688,7 @@ public class Perspective
|
|||||||
{
|
{
|
||||||
int[] x2d = new int[m.getVerticesCount()];
|
int[] x2d = new int[m.getVerticesCount()];
|
||||||
int[] y2d = new int[m.getVerticesCount()];
|
int[] y2d = new int[m.getVerticesCount()];
|
||||||
|
final int[] faceColors3 = m.getFaceColors3();
|
||||||
|
|
||||||
Perspective.modelToCanvas(client,
|
Perspective.modelToCanvas(client,
|
||||||
m.getVerticesCount(),
|
m.getVerticesCount(),
|
||||||
@@ -714,6 +715,11 @@ public class Perspective
|
|||||||
nextTri:
|
nextTri:
|
||||||
for (int tri = 0; tri < m.getTrianglesCount(); tri++)
|
for (int tri = 0; tri < m.getTrianglesCount(); tri++)
|
||||||
{
|
{
|
||||||
|
if (faceColors3[tri] == -2)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
minX = Integer.MAX_VALUE,
|
minX = Integer.MAX_VALUE,
|
||||||
minY = Integer.MAX_VALUE,
|
minY = Integer.MAX_VALUE,
|
||||||
|
|||||||
Reference in New Issue
Block a user