From 6602530110d61147c8240165fe0d2fb9c6f2777b Mon Sep 17 00:00:00 2001 From: DaymareOn Date: Mon, 25 Apr 2022 20:26:45 +0200 Subject: [PATCH] fix: fix scaling egression introduced in fb32e328b847794a81d4d278b5df0f327ae96b64 (#24) Bug about generic scale constraints introduced in the 1.25 version. Was visible when setting player at high scale (10): some clothes animation would not scale gracefully. --- hdtSMP64/hdtSkinnedMesh/hdtGeneric6DofConstraint.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hdtSMP64/hdtSkinnedMesh/hdtGeneric6DofConstraint.cpp b/hdtSMP64/hdtSkinnedMesh/hdtGeneric6DofConstraint.cpp index bb68fa1..5386ce4 100644 --- a/hdtSMP64/hdtSkinnedMesh/hdtGeneric6DofConstraint.cpp +++ b/hdtSMP64/hdtSkinnedMesh/hdtGeneric6DofConstraint.cpp @@ -38,11 +38,8 @@ namespace hdt auto factor3 = factor2 * factor; auto factor5 = factor3 * factor2; - auto frameA = getFrameOffsetA(); - auto frameB = getFrameOffsetB(); - - frameA.setOrigin(frameA.getOrigin() * factorA); - frameB.setOrigin(frameB.getOrigin() * factorB); + getFrameOffsetA().setOrigin(getFrameOffsetA().getOrigin() * factorA); + getFrameOffsetB().setOrigin(getFrameOffsetB().getOrigin() * factorB); m_linearLimits.m_equilibriumPoint *= factor; // target k = ma / x(kg/s^2) m_linearLimits.m_springStiffness *= factor3;