[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
This commit is contained in:
Nathan Sweet 2022-01-26 09:39:15 -04:00
parent 93ff066ec3
commit a5b67629c8

View File

@ -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) {