summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d5d804bc57..ef28c3ad53 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -995,7 +995,13 @@ U32 LLViewerObject::checkMediaURL(const std::string &media_url)
U32 LLViewerObject::extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector3& pos, LLVector3& scale, LLQuaternion& rot)
{
U32 parent_id = 0;
-
+ LLViewerObject::unpackParentID(dp, parent_id);
+ if(parent_id > 0)
+ {
+ //is a child, no need to decode further.
+ return parent_id;
+ }
+
LLViewerObject::unpackVector3(dp, scale, "Scale");
LLViewerObject::unpackVector3(dp, pos, "Pos");
@@ -1003,8 +1009,6 @@ U32 LLViewerObject::extractSpatialExtents(LLDataPackerBinaryBuffer *dp, LLVector
LLViewerObject::unpackVector3(dp, vec, "Rot");
rot.unpackFromVector3(vec);
- LLViewerObject::unpackParentID(dp, parent_id);
-
return parent_id;
}