Browse Source

[csharp] Port fix of additive scale mixing. See #2028, see commit a5b6762.

Harald Csaszar 3 years ago
parent
commit
f5f91899f4
1 changed files with 4 additions and 4 deletions
  1. 4 4
      spine-csharp/src/Animation.cs

+ 4 - 4
spine-csharp/src/Animation.cs

@@ -773,8 +773,8 @@ namespace Spine {
 						bone.scaleY = by + (Math.Abs(y) * Math.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;
 						break;
 					}
 				} else {
@@ -856,7 +856,7 @@ namespace Spine {
 						bone.scaleX = bx + (Math.Abs(x) * Math.Sign(bx) - bx) * alpha;
 						break;
 					case MixBlend.Add:
-						bone.scaleX = (x - bone.data.scaleX) * alpha;
+						bone.scaleX += (x - bone.data.scaleX) * alpha;
 						break;
 					}
 				} else {
@@ -933,7 +933,7 @@ namespace Spine {
 						bone.scaleY = by + (Math.Abs(y) * Math.Sign(by) - by) * alpha;
 						break;
 					case MixBlend.Add:
-						bone.scaleY = (y - bone.data.scaleY) * alpha;
+						bone.scaleY += (y - bone.data.scaleY) * alpha;
 						break;
 					}
 				} else {