Эх сурвалжийг харах

[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.

badlogic 7 жил өмнө
parent
commit
8b89fddea1

+ 1 - 1
spine-cpp/spine-cpp/include/spine/dll.h

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

+ 1 - 1
spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp

@@ -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);
 			}