From 1642614eb4280d8a9bc82e18a679f82ef9f14168 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 11 Jun 2018 20:11:21 +0200 Subject: [PATCH] I completely forgot that this was why I added an interpolator in the first place --- .../model/components/SaddleBags.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/minelittlepony/model/components/SaddleBags.java b/src/main/java/com/minelittlepony/model/components/SaddleBags.java index c95699d3..84e64390 100644 --- a/src/main/java/com/minelittlepony/model/components/SaddleBags.java +++ b/src/main/java/com/minelittlepony/model/components/SaddleBags.java @@ -22,6 +22,7 @@ public class SaddleBags implements IModelPart { float dropAmount = 0; AbstractPonyModel model; + public SaddleBags(AbstractPonyModel model) { this.model = model; @@ -93,7 +94,6 @@ public class SaddleBags implements IModelPart { leftBag.rotateAngleZ = bodySwing; rightBag.rotateAngleZ = -bodySwing; - // TODO: Interpolate dropAmount = hangLow ? 0.15F : 0; } @@ -103,16 +103,16 @@ public class SaddleBags implements IModelPart { @Override public void renderPart(float scale) { - if (hangLow) { - GlStateManager.pushMatrix(); - GlStateManager.translate(0, dropAmount, 0); - } + dropAmount = model.getMetadata().getInterpolator().interpolate("dropAmount", dropAmount, 3); + + GlStateManager.pushMatrix(); + GlStateManager.translate(0, dropAmount, 0); leftBag.render(scale); rightBag.render(scale); - if (hangLow) { - GlStateManager.popMatrix(); - } + + + GlStateManager.popMatrix(); strap.render(scale); }