diff --git a/Engine/source/T3D/lightAnimData.cpp b/Engine/source/T3D/lightAnimData.cpp index b61d2b47d..c5ef93b0f 100644 --- a/Engine/source/T3D/lightAnimData.cpp +++ b/Engine/source/T3D/lightAnimData.cpp @@ -190,13 +190,15 @@ void LightAnimData::AnimValue::updateKey() } template -bool LightAnimData::AnimValue::animate( F32 time, F32 *output ) +bool LightAnimData::AnimValue::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 ); } diff --git a/Engine/source/T3D/lightAnimData.h b/Engine/source/T3D/lightAnimData.h index 69b2ff65d..d8c933674 100644 --- a/Engine/source/T3D/lightAnimData.h +++ b/Engine/source/T3D/lightAnimData.h @@ -151,7 +151,7 @@ public: /// Performs the animation returning the results in the output if /// the time scale is greater than zero. /// @return Returns true if the animation was performed. - bool animate( F32 time, F32 *output ); + bool animate(F32 time, F32 *output, bool multiply = false); /// Called when the key string is changed to update the /// key length and time scale.