diff options
Diffstat (limited to 'indra/newview/llwearable.cpp')
-rw-r--r-- | indra/newview/llwearable.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index d093031bea..acfbc23f62 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -625,7 +625,9 @@ void LLWearable::writeToAvatar() // Pull params for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) { - if( (((LLViewerVisualParam*)param)->getWearableType() == mType) ) + // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the + // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way. + if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (!((LLViewerVisualParam*)param)->getCrossWearable()) ) { S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); @@ -1085,6 +1087,26 @@ void LLWearable::destroyTextures() mSavedTEMap.clear(); } +void LLWearable::pullCrossWearableValues() +{ + // scan through all of the avatar's visual parameters + LLVOAvatar* avatar = gAgent.getAvatarObject(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + param; + param = (LLViewerVisualParam*) avatar->getNextVisualParam()) + { + if( param ) + { + LLDriverParam *driver_param = dynamic_cast<LLDriverParam*>(param); + if(driver_param) + { + // parameter is a driver parameter, have it update its + driver_param->updateCrossDrivenParams(getType()); + } + } + } +} + void LLWearable::setLabelUpdated() const { |