summaryrefslogtreecommitdiff
path: root/indra/newview/llflexibleobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-05-01 15:33:16 -0500
committerDave Parks <davep@lindenlab.com>2012-05-01 15:33:16 -0500
commit7a20b5be7844d1f41307d3186b0a9e297efd797a (patch)
treea3d1499a8cad393c565c3ee8bf1752972e90e773 /indra/newview/llflexibleobject.cpp
parent0249a0d1e7564d06eadb8a23b0f058008dfd6068 (diff)
MAINT-775, MAINT-1022 Regression cleanup.
Diffstat (limited to 'indra/newview/llflexibleobject.cpp')
-rw-r--r--indra/newview/llflexibleobject.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 1876d2dc33..11edb60712 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -818,15 +818,17 @@ LLQuaternion LLVolumeImplFlexible::getEndRotation()
}//------------------------------------------------------------------
-void LLVolumeImplFlexible::updateRelativeXform()
+void LLVolumeImplFlexible::updateRelativeXform(bool force_identity)
{
LLQuaternion delta_rot;
LLVector3 delta_pos, delta_scale;
LLVOVolume* vo = (LLVOVolume*) mVO;
+ bool use_identity = vo->mDrawable->isSpatialRoot() || force_identity;
+
//matrix from local space to parent relative/global space
- delta_rot = vo->mDrawable->isSpatialRoot() ? LLQuaternion() : vo->mDrawable->getRotation();
- delta_pos = vo->mDrawable->isSpatialRoot() ? LLVector3(0,0,0) : vo->mDrawable->getPosition();
+ delta_rot = use_identity ? LLQuaternion() : vo->mDrawable->getRotation();
+ delta_pos = use_identity ? LLVector3(0,0,0) : vo->mDrawable->getPosition();
delta_scale = LLVector3(1,1,1);
// Vertex transform (4x4)