[cpp] Bug in ColorTimeline, created a stack copy instead of a reference, resulting in the setup pose slot color not being set. Partial fix for #1188.

This commit is contained in:
badlogic 2018-10-03 14:15:55 +02:00
parent d3e7b81aae
commit 8b89fddea1
2 changed files with 2 additions and 2 deletions

View File

@ -49,4 +49,4 @@
#define SP_API
#endif
#endif /* SPINE_SHAREDLIB_H */
#endif /* SPINE_SHAREDLIB_H */

View File

@ -75,7 +75,7 @@ void ColorTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector
slot._color.set(slot._data._color);
return;
case MixBlend_First: {
Color color = slot._color, setup = slot._data._color;
Color &color = slot._color, setup = slot._data._color;
color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,
(setup.a - color.a) * alpha);
}