summaryrefslogtreecommitdiff
path: root/indra/newview/lldriverparam.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-30 13:15:36 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-30 13:15:36 +0100
commit61774546f0b260c18c5308143a9c3d02a5e5245e (patch)
tree4566b4f91c2e02956143647067ae642570bb907a /indra/newview/lldriverparam.cpp
parentccd5b9e2f3f1139814a63d9db03c3671c249930c (diff)
parente1517318c58d6796b5566d5cf96c02474fd7376e (diff)
HUGE merge from viewer-trunk. Many conflicts resolved.
Diffstat (limited to 'indra/newview/lldriverparam.cpp')
-rw-r--r--indra/newview/lldriverparam.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp
index 830e975e8a..ebd767d654 100644
--- a/indra/newview/lldriverparam.cpp
+++ b/indra/newview/lldriverparam.cpp
@@ -118,13 +118,12 @@ void LLDriverParamInfo::toStream(std::ostream &out)
out << std::endl;
- LLVOAvatarSelf *avatar = gAgent.getAvatarObject();
- if(avatar)
+ if(isAgentAvatarValid())
{
for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); iter++)
{
LLDrivenEntryInfo driven = *iter;
- LLViewerVisualParam *param = (LLViewerVisualParam*)avatar->getVisualParam(driven.mDrivenID);
+ LLViewerVisualParam *param = (LLViewerVisualParam*)gAgentAvatarp->getVisualParam(driven.mDrivenID);
if (param)
{
param->getInfo()->toStream(out);
@@ -146,7 +145,7 @@ void LLDriverParamInfo::toStream(std::ostream &out)
}
else
{
- llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << avatar << " for driver parameter " << getID() << llendl;
+ llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << gAgentAvatarp << " for driver parameter " << getID() << llendl;
}
out << std::endl;
}
@@ -626,13 +625,13 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight
void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake)
{
- LLVOAvatarSelf *avatar_self = gAgent.getAvatarObject();
- if(mWearablep &&
+ if(isAgentAvatarValid() &&
+ mWearablep &&
driven->mParam->getCrossWearable() &&
mWearablep->isOnTop())
{
// call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values
- avatar_self->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake );
+ gAgentAvatarp->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake );
}
else
{