From 65c62bff060eef1cc9cb4ca6432ec28d60cf0e65 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 26 Jan 2022 20:37:29 +0100 Subject: [PATCH] [cpp] Ported scale mixing fix, see #2028. --- spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp index 4b10157a41..6707311d5b 100644 --- a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp @@ -131,8 +131,8 @@ void ScaleTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha; break; case MixBlend_Add: - bone->_scaleX = (x - bone->_data._scaleX) * alpha; - bone->_scaleY = (y - bone->_data._scaleY) * alpha; + bone->_scaleX += (x - bone->_data._scaleX) * alpha; + bone->_scaleY += (y - bone->_data._scaleY) * alpha; } } else { switch (blend) { @@ -210,7 +210,7 @@ void ScaleXTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto bone->_scaleX = bx + (MathUtil::abs(x) * MathUtil::sign(bx) - bx) * alpha; break; case MixBlend_Add: - bone->_scaleX = (x - bone->_data._scaleX) * alpha; + bone->_scaleX += (x - bone->_data._scaleX) * alpha; } } else { switch (blend) { @@ -283,7 +283,7 @@ void ScaleYTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vecto bone->_scaleY = by + (MathUtil::abs(y) * MathUtil::sign(by) - by) * alpha; break; case MixBlend_Add: - bone->_scaleY = (y - bone->_data._scaleY) * alpha; + bone->_scaleY += (y - bone->_data._scaleY) * alpha; } } else { switch (blend) {