From a5b67629c898787a923fd88b0c6e0b4324df1556 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Wed, 26 Jan 2022 09:39:15 -0400 Subject: [PATCH] [libgdx] Fixed additive scaling mixing. Fixes: http://esotericsoftware.com/forum/Mixing-two-animations-on-additive-track-problem-16953 Problem was introduced by f4021177f9bc71af93509763232b2401589f7acf which tried to fix: http://esotericsoftware.com/forum/About-negative-bone-scale-Web-Player-16410 --- .../src/com/esotericsoftware/spine/Animation.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java index d14a13823..3079b3f67 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java @@ -739,8 +739,8 @@ public class Animation { bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha; break; case 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) { @@ -818,7 +818,7 @@ public class Animation { bone.scaleX = bx + (Math.abs(x) * Math.signum(bx) - bx) * alpha; break; case add: - bone.scaleX = (x - bone.data.scaleX) * alpha; + bone.scaleX += (x - bone.data.scaleX) * alpha; } } else { switch (blend) { @@ -891,7 +891,7 @@ public class Animation { bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha; break; case add: - bone.scaleY = (y - bone.data.scaleY) * alpha; + bone.scaleY += (y - bone.data.scaleY) * alpha; } } else { switch (blend) {