summaryrefslogtreecommitdiff
path: root/indra/llappearance/lldriverparam.cpp
diff options
context:
space:
mode:
authorStinson Linden <stinson@lindenlab.com>2014-06-02 22:32:16 +0100
committerStinson Linden <stinson@lindenlab.com>2014-06-02 22:32:16 +0100
commit8392fde6f6a4dfdb2a78382f3587ecd5a6d937ff (patch)
tree5c0b89998c072175cd1d1cb3c429a127af8f04d6 /indra/llappearance/lldriverparam.cpp
parent4885c122eaf1b4e304ce598f308d806322efacfc (diff)
parent51e0cc8140a2cbe92363cb902144ccc9bf34b7c7 (diff)
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-drtvwr-365.
Diffstat (limited to 'indra/llappearance/lldriverparam.cpp')
-rwxr-xr-xindra/llappearance/lldriverparam.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp
index 08084d3fe4..e630c1118b 100755
--- a/indra/llappearance/lldriverparam.cpp
+++ b/indra/llappearance/lldriverparam.cpp
@@ -152,19 +152,31 @@ void LLDriverParamInfo::toStream(std::ostream &out)
// LLDriverParam
//-----------------------------------------------------------------------------
-LLDriverParam::LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable /* = NULL */) :
+LLDriverParam::LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable /* = NULL */)
+ : LLViewerVisualParam(),
+ mDefaultVec(),
+ mDriven(),
mCurrentDistortionParam( NULL ),
mAvatarAppearance(appearance),
mWearablep(wearable)
{
llassert(mAvatarAppearance);
- if (mWearablep)
- {
- llassert(mAvatarAppearance->isSelf());
- }
+ llassert((mWearablep == NULL) || mAvatarAppearance->isSelf());
mDefaultVec.clear();
}
+LLDriverParam::LLDriverParam(const LLDriverParam& pOther)
+ : LLViewerVisualParam(pOther),
+ mDefaultVec(pOther.mDefaultVec),
+ mDriven(pOther.mDriven),
+ mCurrentDistortionParam(pOther.mCurrentDistortionParam),
+ mAvatarAppearance(pOther.mAvatarAppearance),
+ mWearablep(pOther.mWearablep)
+{
+ llassert(mAvatarAppearance);
+ llassert((mWearablep == NULL) || mAvatarAppearance->isSelf());
+}
+
LLDriverParam::~LLDriverParam()
{
}
@@ -186,13 +198,7 @@ BOOL LLDriverParam::setInfo(LLDriverParamInfo *info)
/*virtual*/ LLViewerVisualParam* LLDriverParam::cloneParam(LLWearable* wearable) const
{
llassert(wearable);
- LLDriverParam *new_param = new LLDriverParam(mAvatarAppearance, wearable);
- // FIXME DRANO this clobbers mWearablep, which means any code
- // currently using mWearablep is wrong, or at least untested.
- *new_param = *this;
- //new_param->mWearablep = wearable;
-// new_param->mDriven.clear(); // clear driven list to avoid overwriting avatar driven params from wearables.
- return new_param;
+ return new LLDriverParam(*this);
}
void LLDriverParam::setWeight(F32 weight)