summaryrefslogtreecommitdiff
path: root/indra/newview/lldriverparam.cpp
diff options
context:
space:
mode:
authorNeal Orman <nyx@lindenlab.com>2009-10-19 18:23:19 +0000
committerNeal Orman <nyx@lindenlab.com>2009-10-19 18:23:19 +0000
commit0d6f1d125eb0f6de766d617978a022fc74b4aec7 (patch)
tree0b01c99ef836708a55c51c435e3e681a30a59ba7 /indra/newview/lldriverparam.cpp
parenta606e7be9bb5cae91d969826a00df1985ee32f15 (diff)
EXT-1664 bugfix for male avatars have female bodies
Found a couple bugs in the code relating to cross-wearable visual param linking. Fixed with this patch - cross-wearable and inter-wearable visual params should now link properly for both wearable-owned and avatar-owned parameters. Code reviewed by Seraph
Diffstat (limited to 'indra/newview/lldriverparam.cpp')
-rw-r--r--indra/newview/lldriverparam.cpp25
1 files changed, 6 insertions, 19 deletions
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index 87a8557a88..e7295512c1 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -180,23 +180,6 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info)
setWeight(getDefaultWeight(), FALSE );
- BOOL success;
- if (mWearablep)
- {
- LLVisualParam*(LLWearable::*function)(S32)const = &LLWearable::getVisualParam; // need this line to disambiguate between versions of LLCharacter::getVisualParam()
- success = linkDrivenParams(boost::bind(function,(LLWearable*)mWearablep, _1), false);
- }
- else
- {
- LLVisualParam*(LLCharacter::*function)(S32)const = &LLCharacter::getVisualParam; // need this line to disambiguate between versions of LLCharacter::getVisualParam()
- success = linkDrivenParams(boost::bind(function,(LLCharacter*)mAvatarp, _1), false);
- }
- if(!success)
- {
- mInfo = NULL;
- return FALSE;
- }
-
return TRUE;
}
@@ -502,8 +485,6 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross
{
BOOL success = TRUE;
LLDriverParamInfo::entry_info_list_t::iterator iter;
- mDriven.clear();
- mDriven.reserve(getInfo()->mDrivenInfoList.size());
for (iter = getInfo()->mDrivenInfoList.begin(); iter != getInfo()->mDrivenInfoList.end(); ++iter)
{
LLDrivenEntryInfo *driven_info = &(*iter);
@@ -537,6 +518,12 @@ BOOL LLDriverParam::linkDrivenParams(visual_param_mapper mapper, bool only_cross
return success;
}
+void LLDriverParam::resetDrivenParams()
+{
+ mDriven.clear();
+ mDriven.reserve(getInfo()->mDrivenInfoList.size());
+}
+
//-----------------------------------------------------------------------------
// getDrivenWeight()
//-----------------------------------------------------------------------------