summaryrefslogtreecommitdiff
path: root/indra/newview/lltexlayerparams.cpp
diff options
context:
space:
mode:
authornyx@NyxTop <nyx@NyxTop>2009-10-29 15:13:27 -0400
committernyx@NyxTop <nyx@NyxTop>2009-10-29 15:13:27 -0400
commit65f534899740018b8efb662f8154030edb07fc0f (patch)
tree5a9697d4fb5a6004a80545804db11c51e1bdfc4c /indra/newview/lltexlayerparams.cpp
parentbc9808a01710ab21d60df3b6652b500f31f1c40e (diff)
EXT-1945 visual parameter animations broken
First round of fixes for trying to fix the visual param animations Code reviewed by Seraph
Diffstat (limited to 'indra/newview/lltexlayerparams.cpp')
-rw-r--r--indra/newview/lltexlayerparams.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index e1643af71d..74e0fa077e 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -42,8 +42,7 @@
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
mTexLayer(layer),
- mAvatar(NULL),
- mIsWearableParam(TRUE)
+ mAvatar(NULL)
{
if (mTexLayer != NULL)
{
@@ -56,8 +55,7 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) :
- mTexLayer(NULL),
- mIsWearableParam(FALSE)
+ mTexLayer(NULL)
{
mAvatar = avatar;
}
@@ -177,7 +175,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
{
mCurWeight = new_weight;
- if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
+ if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param.
{
if (gAgent.cameraCustomizeAvatar())
{
@@ -192,6 +190,13 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
void LLTexLayerParamAlpha::setAnimationTarget(F32 target_value, BOOL set_by_user)
{
+ // do not animate dummy parameters
+ if (mIsDummy)
+ {
+ setWeight(target_value, set_by_user);
+ return;
+ }
+
mTargetWeight = target_value;
setWeight(target_value, set_by_user);
mIsAnimating = TRUE;
@@ -468,7 +473,7 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user)
return;
}
- if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
+ if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param.
{
onGlobalColorChanged(set_by_user);
if (mTexLayer)