From 0d6f1d125eb0f6de766d617978a022fc74b4aec7 Mon Sep 17 00:00:00 2001 From: Neal Orman Date: Mon, 19 Oct 2009 18:23:19 +0000 Subject: 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 --- indra/newview/lldriverparam.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'indra/newview/lldriverparam.cpp') 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() //----------------------------------------------------------------------------- -- cgit v1.2.3