diff options
author | Merov Linden <merov@lindenlab.com> | 2011-02-09 15:10:26 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-02-09 15:10:26 -0800 |
commit | b82f2c4e4d8c4b9a349e4cd933dff7a0844019c0 (patch) | |
tree | 5d6422987ee07704e4f33e8558d81a4c3eef0043 /indra/newview/llviewerobject.cpp | |
parent | e58cbfa53ee62a53e19e7160d741e84e2a8ee67d (diff) | |
parent | b6571ee127f22316be8b9e32c771f8bfb35a0b00 (diff) |
pull from viewer-development
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a7f5bb2a60..32cd8dbb39 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -3008,6 +3008,8 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) { if (!mOnMap) { + llassert_always(LLWorld::getInstance()->getRegionFromHandle(getRegion()->getHandle())); + gObjectList.addToMap(this); mOnMap = TRUE; } @@ -3535,8 +3537,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 { @@ -3577,6 +3579,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()) { @@ -3585,15 +3588,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); + } } |