From 5c5e71681a8d7c311affb24695ef7c0a7a8b7657 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 29 Dec 2020 18:21:25 -0500 Subject: [PATCH] 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 --- .../net/runelite/client/plugins/gpu/GpuPlugin.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java index e7d3bb50ab..2d3b0c78d4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java @@ -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();