gpu: correctly set model height on non-model renderables
This was incorrect before, but I think is only used for determining if a renderable is occluded, and doesn't change any behaviors I can see
This commit is contained in:
@@ -1449,6 +1449,12 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
Model model = renderable instanceof Model ? (Model) renderable : renderable.getModel();
|
||||
if (model != null)
|
||||
{
|
||||
// Apply height to renderable from the model
|
||||
if (model != renderable)
|
||||
{
|
||||
renderable.setModelHeight(model.getModelHeight());
|
||||
}
|
||||
|
||||
model.calculateBoundsCylinder();
|
||||
|
||||
if (!isVisible(model, orientation, pitchSin, pitchCos, yawSin, yawCos, x, y, z, hash))
|
||||
@@ -1512,7 +1518,10 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
||||
if (model != null)
|
||||
{
|
||||
// Apply height to renderable from the model
|
||||
model.setModelHeight(model.getModelHeight());
|
||||
if (model != renderable)
|
||||
{
|
||||
renderable.setModelHeight(model.getModelHeight());
|
||||
}
|
||||
|
||||
model.calculateBoundsCylinder();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user