|
@@ -190,13 +190,15 @@ void LightAnimData::AnimValue<COUNT>::updateKey()
|
|
|
}
|
|
|
|
|
|
template<U32 COUNT>
|
|
|
-bool LightAnimData::AnimValue<COUNT>::animate( F32 time, F32 *output )
|
|
|
+bool LightAnimData::AnimValue<COUNT>::animate(F32 time, F32 *output, bool multiply)
|
|
|
{
|
|
|
F32 scaledTime, lerpFactor, valueRange, keyFrameLerp;
|
|
|
U32 posFrom, posTo;
|
|
|
S32 keyFrameFrom, keyFrameTo;
|
|
|
F32 initialValue = *output;
|
|
|
-
|
|
|
+ if (!multiply)
|
|
|
+ initialValue = 1;
|
|
|
+
|
|
|
bool wasAnimated = false;
|
|
|
|
|
|
for ( U32 i=0; i < COUNT; i++ )
|
|
@@ -305,6 +307,6 @@ void LightAnimData::animate( LightInfo *lightInfo, LightAnimState *state )
|
|
|
lightInfo->setColor( color );
|
|
|
|
|
|
F32 brightness = state->brightness;
|
|
|
- mBrightness.animate( time, &brightness );
|
|
|
+ mBrightness.animate( time, &brightness, true );
|
|
|
lightInfo->setBrightness( brightness );
|
|
|
}
|