gpu: move calculateExtreme() after visibility check
It is only used in the clickbox code and isn't required for isVisible()
This commit is contained in:
@@ -1450,13 +1450,13 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
if (model != null)
|
if (model != null)
|
||||||
{
|
{
|
||||||
model.calculateBoundsCylinder();
|
model.calculateBoundsCylinder();
|
||||||
model.calculateExtreme(orientation);
|
|
||||||
|
|
||||||
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.calculateExtreme(orientation);
|
||||||
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
||||||
|
|
||||||
modelX = x + client.getCameraX2();
|
modelX = x + client.getCameraX2();
|
||||||
@@ -1480,13 +1480,13 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
Model model = (Model) renderable;
|
Model model = (Model) renderable;
|
||||||
|
|
||||||
model.calculateBoundsCylinder();
|
model.calculateBoundsCylinder();
|
||||||
model.calculateExtreme(orientation);
|
|
||||||
|
|
||||||
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.calculateExtreme(orientation);
|
||||||
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
||||||
|
|
||||||
int tc = Math.min(MAX_TRIANGLE, model.getTrianglesCount());
|
int tc = Math.min(MAX_TRIANGLE, model.getTrianglesCount());
|
||||||
@@ -1515,13 +1515,13 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
model.setModelHeight(model.getModelHeight());
|
model.setModelHeight(model.getModelHeight());
|
||||||
|
|
||||||
model.calculateBoundsCylinder();
|
model.calculateBoundsCylinder();
|
||||||
model.calculateExtreme(orientation);
|
|
||||||
|
|
||||||
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.calculateExtreme(orientation);
|
||||||
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
client.checkClickbox(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash);
|
||||||
|
|
||||||
boolean hasUv = model.getFaceTextures() != null;
|
boolean hasUv = model.getFaceTextures() != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user