From 8b89fddea1b013f6b627a1acd932d83af46bf228 Mon Sep 17 00:00:00 2001 From: badlogic Date: Wed, 3 Oct 2018 14:15:55 +0200 Subject: [PATCH] [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. --- spine-cpp/spine-cpp/include/spine/dll.h | 2 +- spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-cpp/spine-cpp/include/spine/dll.h b/spine-cpp/spine-cpp/include/spine/dll.h index 726113aa6..caae94198 100644 --- a/spine-cpp/spine-cpp/include/spine/dll.h +++ b/spine-cpp/spine-cpp/include/spine/dll.h @@ -49,4 +49,4 @@ #define SP_API #endif -#endif /* SPINE_SHAREDLIB_H */ \ No newline at end of file +#endif /* SPINE_SHAREDLIB_H */ diff --git a/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp index 1023642eb..604fdd7d9 100644 --- a/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp +++ b/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); }