LLViewerObject::setPosition already calls updateDrawable. Removing extra updateDrawablecalls.

Referring to cam axis byref.
This commit is contained in:
Shyotl
2011-05-04 19:56:55 -05:00
parent 96f400eb4c
commit 5b36f29b76
2 changed files with 8 additions and 8 deletions

View File

@@ -704,8 +704,8 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
LLVector3 box = (facep->mExtents[1] - facep->mExtents[0]) * 0.25f;
LLVector3 v = (facep->mCenterLocal-camera.getOrigin());
LLVector3 at = camera.getAtAxis();
for (U32 j = 0; j < 3; j++)
const LLVector3& at = camera.getAtAxis();
for (U32 j = 0; j < 3; j++)
{
v.mV[j] -= box.mV[j] * at.mV[j];
}

View File

@@ -3421,8 +3421,8 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped)
// Set position relative to parent, if no parent, relative to region
if (!isRoot())
{
LLViewerObject::setPosition(pos_parent);
updateDrawable(damped);
LLViewerObject::setPosition(pos_parent, damped);
//updateDrawable(damped);
}
else
{
@@ -3463,6 +3463,7 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
LLVector3 position_offset = getPosition() * getParent()->getRotation();
((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset);
updateDrawable(damped);
}
else if (isJointChild())
{
@@ -3471,15 +3472,14 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)
LLQuaternion inv_parent_rot = parent->getRotation();
inv_parent_rot.transQuat();
LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot;
LLViewerObject::setPosition(pos_parent);
LLViewerObject::setPosition(pos_parent, damped);
}
else
{
LLViewerObject::setPosition(pos_edit);
LLViewerObject::setPosition(pos_edit, damped);
mPositionRegion = pos_edit;
mPositionAgent = mRegionp->getPosAgentFromRegion(mPositionRegion);
}
updateDrawable(damped);
}
}