mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[cpp] Ported scale mixing fix, see #2028.
This commit is contained in:
parent
c8fe2c884b
commit
65c62bff06
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user